Notification of trigger condition to reduce declared capacity of a storage device

ABSTRACT

Systems, methods and/or devices are used to enable notification of a trigger condition to reduce declared capacity of a storage device. In one aspect, the method includes, at a storage device of a storage system, the storage device including non-volatile memory: (1) detecting a trigger condition for reducing declared capacity of the non-volatile memory of the storage device, and (2) notifying a host to which the storage device is operatively coupled of the trigger condition for reducing declared capacity of the non-volatile memory of the storage device, the trigger condition for enabling performance of an amelioration process to reduce declared capacity of the non-volatile memory of the storage device. In some embodiments, the storage device includes one or more flash memory devices.

RELATED APPLICATIONS

This application claims priority to U.S. Provisional Patent ApplicationSer. No. 62/044,898, filed Sep. 2, 2014, which is herein incorporated byreference in its entirety.

This application is related to the following applications, each of whichis herein incorporated by reference in its entirety:

-   -   U.S. patent application Ser. No. 14/621,200, filed Feb. 12,        2015, which claims priority to U.S. Provisional Patent        Application Ser. No. 62/044,883, filed Sep. 2, 2014;    -   U.S. patent application Ser. No. 14/621,219, filed Feb. 12,        2015, which claims priority to U.S. Provisional Patent        Application Ser. No. 62/044,919, filed Sep. 2, 2014;    -   U.S. patent application Ser. No. 14/621,237, filed Feb. 12,        2015, which claims priority to U.S. Provisional Patent        Application Ser. No. 62/044,890, filed Sep. 2, 2014;    -   U.S. patent application Ser. No. 14/621,263, filed Feb. 12,        2015, which claims priority to U.S. Provisional Patent        Application Ser. No. 62/044,905, filed Sep. 2, 2014;    -   U.S. patent application Ser. No. 14/621,275, filed Feb. 12,        2015, which claims priority to U.S. Provisional Patent        Application Ser. No. 62/044,981, filed Sep. 2, 2014;    -   U.S. patent application Ser. No. 14/621,289, filed Feb. 12,        2015, which claims priority to U.S. Provisional Patent        Application Ser. No. 62/044,989, filed Sep. 2, 2014;    -   U.S. patent application Ser. No. 14/621,292, filed Feb. 12,        2015, which claims priority to U.S. Provisional Patent        Application Ser. No. 62/044,983, filed Sep. 2, 2014;    -   U.S. patent application Ser. No. 14/621,212, filed Feb. 12,        2015, which claims priority to U.S. Provisional Patent        Application Ser. No. 62/044,963, filed Sep. 2, 2014;    -   U.S. patent application Ser. No. 14/621,090, filed Feb. 12,        2015, which claims priority to U.S. Provisional Patent        Application Ser. No. 62/044,930, filed Sep. 2, 2014;    -   U.S. patent application Ser. No. 14/621,107, filed Feb. 12,        2015, which claims priority to U.S. Provisional Patent        Application Ser. No. 62/044,969, filed Sep. 2, 2014;    -   U.S. patent application Ser. No. 14/621,121, filed Feb. 12,        2015, which claims priority to U.S. Provisional Patent        Application Ser. No. 62/044,976, filed Sep. 2, 2014;    -   U.S. patent application Ser. No. 14/621,135, filed Feb. 12,        2015, which claims priority to U.S. Provisional Patent        Application Ser. No. 62/044,932, filed Sep. 2, 2014; and    -   U.S. patent application Ser. No. 14/621,148, filed Feb. 12,        2015, now U.S. Pat. No. 9,158,681, which claims priority to U.S.        Provisional Patent Application Ser. No. 62/044,936, filed Sep.        2, 2014.

TECHNICAL FIELD

The disclosed embodiments relate generally to memory systems, and inparticular, to notification of a trigger condition to reduce declaredcapacity of a storage device (e.g., comprising one or more flash memorydevices).

BACKGROUND

Semiconductor memory devices, including flash memory, typically utilizememory cells to store data as an electrical value, such as an electricalcharge or voltage. A flash memory cell, for example, includes a singletransistor with a floating gate that is used to store a chargerepresentative of a data value. Flash memory is a non-volatile datastorage device that can be electrically erased and reprogrammed. Moregenerally, non-volatile memory (e.g., flash memory, as well as othertypes of non-volatile memory implemented using any of a variety oftechnologies) retains stored information even when not powered, asopposed to volatile memory, which requires power to maintain the storedinformation. Increases in storage density have been facilitated invarious ways, including increasing the density of memory cells on a chipenabled by manufacturing developments, and transitioning fromsingle-level flash memory cells to multi-level flash memory cells, sothat two or more bits can be stored by each flash memory cell.

Repeated erasure and reprogramming of flash memory cells causesdegradation of the charge storage capability (wear). Eventually, thecharge storage capability degrades to the point where it becomesimpossible or infeasible to recover the original data (e.g., anunrecoverable codeword is read from the flash memory device, thecomputational resources required to recover a codeword exceed apredefined threshold, or a count of program-erase (P/E) cycles for theflash memory device exceeds a threshold value) and the device isconsidered worn out. Wear-leveling technology is often used todistribute the wear across the multiple portions of a flash memorydevice. In a typical system, once the wear limit of a portion of a flashmemory device is reached, the entire flash memory device is consideredto have failed.

SUMMARY

Various embodiments of systems, methods and devices within the scope ofthe appended claims each have several aspects, no single one of which issolely responsible for the attributes described herein. Without limitingthe scope of the appended claims, after considering this disclosure, andparticularly after considering the section entitled “DetailedDescription” one will understand how the aspects of various embodimentsare used to enable notification of a trigger condition to reducedeclared capacity of a storage device. In one aspect, a host to which astorage device is operatively coupled is notified of a trigger conditionfor reducing declared capacity of non-volatile memory of the storagedevice.

BRIEF DESCRIPTION OF THE DRAWINGS

So that the present disclosure can be understood in greater detail, amore particular description may be had by reference to the features ofvarious embodiments, some of which are illustrated in the appendeddrawings. The appended drawings, however, merely illustrate pertinentfeatures of the present disclosure and are therefore not to beconsidered limiting, for the description may admit to other effectivefeatures.

FIG. 1A is a block diagram illustrating an implementation of a datastorage system, in accordance with some embodiments.

FIG. 1B is a block diagram illustrating an implementation of a datastorage system, in accordance with some embodiments.

FIG. 1C is a block diagram illustrating an implementation of a datastorage system, in accordance with some embodiments.

FIG. 2A-1 is a block diagram illustrating an implementation of amanagement module, in accordance with some embodiments.

FIG. 2A-2 is a block diagram illustrating an implementation of amanagement module, in accordance with some embodiments.

FIG. 2B-1 is a block diagram illustrating an implementation of a systemmanagement module, in accordance with some embodiments.

FIG. 2B-2 is a block diagram illustrating an implementation of a systemmanagement module, in accordance with some embodiments.

FIG. 2C-1 is a block diagram illustrating an implementation of a clustermanagement module, in accordance with some embodiments.

FIG. 2C-2 is a block diagram illustrating an implementation of a clustermanagement module, in accordance with some embodiments.

FIG. 2D is a block diagram illustrating an implementation of anamelioration module included in FIGS. 2A-1 and 2A-2, in accordance withsome embodiments.

FIG. 3 is a block diagram of a logical address space, and morespecifically a logical block address (LBA) space, in accordance withsome embodiments.

FIG. 4 is a block diagram of a mapping table and physical address space,in accordance with some embodiments.

FIG. 5A is a prophetic diagram of voltage distributions that may befound in a single-level flash memory cell (SLC) over time, in accordancewith some embodiments.

FIG. 5B is a prophetic diagram of voltage distributions that may befound in a multi-level flash memory cell (MLC) over time, in accordancewith some embodiments.

FIG. 6 illustrates a flowchart representation of a method of managing astorage system, in accordance with some embodiments.

FIGS. 7A-7D illustrate a flowchart representation of a method ofmanaging a storage system, in accordance with some embodiments.

FIGS. 8A-8D illustrate a flowchart representation of a method ofmanaging a storage system, in accordance with some embodiments.

FIGS. 9A-9D illustrate a flowchart representation of a method ofmanaging a storage system, in accordance with some embodiments.

FIGS. 10A-10C illustrate a flowchart representation of a method ofmanaging a storage system, in accordance with some embodiments.

FIGS. 11A-11C illustrate a flowchart representation of a method ofmanaging a storage system, in accordance with some embodiments.

In accordance with common practice the various features illustrated inthe drawings may not be drawn to scale. Accordingly, the dimensions ofthe various features may be arbitrarily expanded or reduced for clarity.In addition, some of the drawings may not depict all of the componentsof a given system, method or device. Finally, like reference numeralsmay be used to denote like features throughout the specification andfigures.

DETAILED DESCRIPTION

When a multi-level flash cell has reached its wear limit it typicallystill has charge retention capability sufficient to store a reducednumber of charge levels. Often it is the case that a substantial numberof erasure and reprogramming cycles can be performed on a wear-limitedmulti-level flash cell with full recovery of the stored data, providedthat a reduced number of charge levels is used and expected. Forexample, a flash memory device operating in 3 bits per cell mode (TLC)typically can perform between 500 and 1500 erasure and reprogrammingcycles before being considered worn out. However, at that point in timeit will typically still have sufficient charge storage capability tooperate in the single bit per cell mode (SLC) for an additional 10,000to 20,000 erasure and reprogramming cycles before the SLC wear limit isencountered. Thus the lifetime of the flash memory device may beextended provided that it can be allowed to store less data. Currentlyit is difficult for a storage system to utilize this extended capabilitybecause storage system mechanisms for managing and working with astorage device whose capacity decreases with usage, by decreasingover-provisioning, are inadequate. Consequently what is desired aremechanisms for managing and working with such a storage device,including mechanisms to inform the surrounding system of its impending(or imminent) reduction in capacity so that the system may adjust itsoperation accordingly. Potentially, memory devices with other forms ofnon-volatile memory may benefit from the same or similar mechanisms asthose described in this document.

The various embodiments described herein include systems, methods and/ordevices used to enable triggering a process to reduce declared capacityof a storage device. Some embodiments include systems, methods and/ordevices to detect a trigger condition in accordance with one or moremetrics of a storage device and enable an amelioration processassociated with the detected trigger condition, the amelioration processto reduce declared capacity of non-volatile memory of the storagedevice.

(A1) More specifically, some embodiments include a method of managing astorage system. In some embodiments, the method includes, at a storagedevice of the storage system: (1) generating one or more metrics of thestorage device, the storage device including non-volatile memory, (2)detecting a trigger condition in accordance with the one or more metricsof the storage device, and (3) enabling an amelioration processassociated with the detected trigger condition, the amelioration processto reduce declared capacity of the non-volatile memory of the storagedevice.

(A1-1) In some embodiments of the method of A1, the method furtherincludes: (1) prior to detecting the trigger condition, detecting afirst wear condition of the non-volatile memory of the storage device,wherein a total storage capacity of the non-volatile memory of thestorage device includes declared capacity and over-provisioning, and (2)in response to detecting the first wear condition, performing a remedialaction that reduces over-provisioning of the non-volatile memory of thestorage device without reducing declared capacity of the non-volatilememory of the storage device.

(A1-2) In some embodiments of the method of A1-1, detecting the triggercondition includes detecting a second wear condition distinct from thefirst wear condition.

(A2) In some embodiments of the method of A1 or A1-1 or A1-2, enablingthe amelioration process associated with the detected trigger conditionincludes notifying a host to which the storage device is operativelycoupled of the trigger condition.

(A3) In some embodiments of the method of A1 or A1-1 or A1-2, enablingthe amelioration process associated with the detected trigger conditionincludes: (1) receiving a query from a host to which the storage deviceis operatively coupled, and (2) in response to receiving the query,reporting the trigger condition.

(A4) In some embodiments of the method of A1 or A1-1 or A1-2, enablingthe amelioration process associated with the detected trigger conditionincludes: (1) receiving a command from a host to which the storagedevice is operatively coupled, and (2) in response to receiving thecommand, sending a response to the command and a notification of thetrigger condition.

(A5) In some embodiments of the method of A1 or A1-1 or A1-2, enablingthe amelioration process associated with the detected trigger conditionincludes: (1) receiving a command from a host to which the storagedevice is operatively coupled, and (2) in response to receiving thecommand, sending a response to the command and a notification thatprompts the host to obtain information with respect to the triggercondition.

(A6) In some embodiments of the method of any of A2 to A5, the hostincludes a client on behalf of which data is stored in the storagesystem.

(A7) In some embodiments of the method of any of A2 to A5, the hostincludes a storage system controller of the storage system.

(A8) In some embodiments of the method of any of A2 to A5, the hostincludes a cluster controller of the storage system.

(A9) In some embodiments of the method of any of A1 to A8, enabling theamelioration process associated with the detected trigger conditionincludes scheduling the amelioration process to be performed on thestorage device.

(A10) In some embodiments of the method of any of A1 to A9, enabling theamelioration process associated with the detected trigger conditionincludes determining one or more parameters for the ameliorationprocess.

(A11) In some embodiments of the method of A10, enabling theamelioration process associated with the detected trigger conditionfurther includes reporting at least a subset of the one or moreparameters for the amelioration process.

(A12) In some embodiments of the method of any of A1 to A11, generatingone or more metrics of the storage device includes generating at leastone metric, of the one or more metrics, for each memory portion of aplurality of memory portions of the storage device.

(A13) In some embodiments of the method of any of A1 to A12, the one ormore metrics of the storage device include one or more status metricscorresponding to the storage device's ability to retain data.

(A14) In some embodiments of the method of any of A1 to A13, the one ormore metrics of the storage device include one or more performancemetrics corresponding to performance of the storage device.

(A15) In some embodiments of the method of any of A1 to A14, the one ormore metrics of the storage device include one or more wear metricscorresponding to wear on the storage device.

(A16) In some embodiments of the method of any of A1 to A15, the one ormore metrics of the storage device include one or more time metrics.

(A17) In some embodiments of the method of any of A1 to A16, the one ormore metrics of the storage device include values of the one or moremetrics from more than one time.

(A18) In some embodiments of the method of any of A1 to A17, the methodfurther includes, after enabling the amelioration process, (1)re-evaluating the trigger condition in accordance with the one or moremetrics of the storage device, and (2) in accordance with adetermination that the trigger condition is no longer valid, abortingthe amelioration process to reduce declared capacity of the non-volatilememory of the storage device.

(A19) In some embodiments of the method of any of A1 to A18, theamelioration process to reduce declared capacity of the non-volatilememory of the storage device includes a process to reduce utilization ofthe non-volatile memory of the storage device.

(A20) In some embodiments of the method of any of A1 to A19, the storagedevice comprises one or more flash memory devices.

(A21) In another aspect, a storage device includes (1) non-volatilememory (e.g., comprising one or more non-volatile storage devices, suchas flash memory devices), (2) one or more processors, and (3) controllermemory (e.g., non-volatile memory or volatile memory in or coupled tothe controller) storing one or more programs, which when executed by theone or more processors cause the storage device to perform or controlperformance of any of the methods A1 to A20 described herein.

(A23) In yet another aspect, any of the methods A1 to A20 describedabove are performed by a storage device including means for performingany of the methods described herein.

(A25) In yet another aspect, a storage system includes (1) a storagemedium (e.g., comprising one or more non-volatile storage devices, suchas flash memory devices) (2) one or more processors, and (3) memory(e.g., non-volatile memory or volatile memory in the storage system)storing one or more programs, which when executed by the one or moreprocessors cause the storage system to perform or control performance ofany of the methods A1 to A20 described herein.

(A26) In yet another aspect, some embodiments include a non-transitorycomputer readable storage medium, storing one or more programsconfigured for execution by one or more processors of a storage device,the one or more programs including instructions for performing any ofthe methods described herein.

The various embodiments described herein include systems, methods and/ordevices used to enable triggering, at a host, a process to reducedeclared capacity of a storage device. Some embodiments include systems,methods and/or devices to detect a trigger condition in accordance withone or more metrics of a storage device and enable an ameliorationprocess associated with the detected trigger condition, the ameliorationprocess to reduce declared capacity of non-volatile memory of thestorage device.

(B1) More specifically, some embodiments include a method of managing astorage system. In some embodiments, the method includes, at a host towhich a storage device of the storage system is operatively coupled: (1)obtaining one or more metrics of the storage device, the storage deviceincluding non-volatile memory, (2) detecting a trigger condition inaccordance with the one or more metrics of the storage device, and (3)enabling an amelioration process associated with the detected triggercondition, the amelioration process to reduce declared capacity of thenon-volatile memory of the storage device.

(B1-1) In some embodiments of the method of B1, the method furtherincludes: (1) prior to detecting the trigger condition, detecting afirst wear condition of the non-volatile memory of the storage device,wherein a total storage capacity of the non-volatile memory of thestorage device includes declared capacity and over-provisioning, and (2)in response to detecting the first wear condition, performing a remedialaction that reduces over-provisioning of the non-volatile memory of thestorage device without reducing declared capacity of the non-volatilememory of the storage device.

(B1-2) In some embodiments of the method of B1-1, detecting the triggercondition includes detecting a second wear condition distinct from thefirst wear condition.

(B2) In some embodiments of the method of B1 or B1-1 or B1-2, the hostincludes a client on behalf of which data is stored in the storagesystem.

(B3) In some embodiments of the method of B1 or B1-1 or B1-2, the hostincludes a storage system controller of the storage system.

(B4) In some embodiments of the method of B1 or B1-1 or B1-2, the hostincludes a cluster controller of the storage system.

(B5) In some embodiments of the method of any of B1 to B4, enabling theamelioration process associated with the detected trigger conditionincludes scheduling the amelioration process to be performed on thestorage device.

(B6) In some embodiments of the method of any of B1 to B5, enabling theamelioration process associated with the detected trigger conditionincludes determining one or more parameters for the ameliorationprocess.

(B7) In some embodiments of the method of B6, enabling the ameliorationprocess associated with the detected trigger condition further includesconveying at least a subset of the one or more parameters for theamelioration process to the storage device.

(B8) In some embodiments of the method of any of B1 to B7, obtaining oneor more metrics of the storage device includes obtaining at least onemetric, of the one or more metrics, for each memory portion of aplurality of memory portions of the storage device.

(B9) In some embodiments of the method of any of B1 to B8, the one ormore metrics of the storage device include one or more status metricscorresponding to the storage device's ability to retain data.

(B10) In some embodiments of the method of any of B1 to B9, the one ormore metrics of the storage device include one or more performancemetrics corresponding to performance of the storage device.

(B11) In some embodiments of the method of any of B1 to B10, the one ormore metrics of the storage device include one or more wear metricscorresponding to wear on the storage device.

(B12) In some embodiments of the method of any of B1 to B11, the one ormore metrics of the storage device include one or more time metrics.

(B13) In some embodiments of the method of any of B1 to B12, the one ormore metrics of the storage device include values of the one or moremetrics from more than one time.

(B14) In some embodiments of the method of any of B1 to B13, the methodfurther includes, after enabling the amelioration process, (1)re-evaluating the trigger condition in accordance with the one or moremetrics of the storage device, and (2) in accordance with adetermination that the trigger condition is no longer valid, abortingthe amelioration process to reduce declared capacity of the non-volatilememory of the storage device.

(B15) In some embodiments of the method of any of B1 to B14, theamelioration process to reduce declared capacity of the non-volatilememory of the storage device includes a process to reduce utilization ofthe non-volatile memory of the storage device.

(B16) In some embodiments of the method of any of B1 to B15, the storagedevice comprises one or more flash memory devices.

(B17) In another aspect, a storage system includes (1) one or morestorage devices (e.g., comprising one or more non-volatile storagedevices, such as flash memory devices), (2) a host to which the one ormore storage devices are operatively coupled, (3) one or moreprocessors, and (4) controller memory storing one or more programs,which when executed by the one or more processors cause the host toperform or control performance of any of the methods B1 to B16 describedherein.

(B19) In yet another aspect, any of the methods B1 to B16 describedabove are performed by a host system, coupled to one or more storagedevices, the host system including means for performing any of themethods described herein.

(B21) In yet another aspect, some embodiments include a non-transitorycomputer readable storage medium, storing one or more programsconfigured for execution by one or more processors of a storage system,the one or more programs including instructions for performing any ofthe methods described herein.

(B22) In yet another aspect, a host system includes (1) an interface foroperatively coupling to a storage system, (2) one or more processors,and (3) controller memory storing one or more programs, which whenexecuted by the one or more processors cause the host system to performor control performance of any of the methods B1 to B16 described herein.

In yet another aspect, some embodiments include a non-transitorycomputer readable storage medium, storing one or more programsconfigured for execution by one or more processors of a host system, theone or more programs including instructions for performing any of themethods described herein.

The various embodiments described herein include systems, methods and/ordevices used to enable triggering a process to reduce declared capacityof a storage device in a multi-storage-device storage system. Someembodiments include systems, methods and/or devices to detect a triggercondition in accordance with one or more metrics of one or more storagedevices of a plurality of storage devices of a storage system and enablean amelioration process associated with the detected trigger condition,the amelioration process to reduce declared capacity of non-volatilememory of the respective storage device.

(C1) More specifically, some embodiments include a method of managing astorage system. In some embodiments, the method includes: (1) obtaining,for each storage device of a plurality of storage devices of the storagesystem, one or more metrics of the storage device, the storage deviceincluding non-volatile memory, (2) detecting a trigger condition forreducing declared capacity of the non-volatile memory of a respectivestorage device of the plurality of storage devices of the storagesystem, the trigger condition detected in accordance with the one ormore metrics of one or more storage devices of the plurality of storagedevices, and (3) enabling an amelioration process associated with thedetected trigger condition, the amelioration process to reduce declaredcapacity of the non-volatile memory of the respective storage device.

(C1-1) In some embodiments of the method of C1, the method furtherincludes: (1) prior to detecting the trigger condition, detecting afirst wear condition of the non-volatile memory of the respectivestorage device, wherein a total storage capacity of the non-volatilememory of the respective storage device includes declared capacity andover-provisioning, and (2) in response to detecting the first wearcondition, performing a remedial action that reduces over-provisioningof the non-volatile memory of the respective storage device withoutreducing declared capacity of the non-volatile memory of the respectivestorage device.

(C1-2) In some embodiments of the method of C1-1, detecting the triggercondition includes detecting a second wear condition distinct from thefirst wear condition.

(C2) In some embodiments of the method of C1 or C1-1 or C1-2, enablingthe amelioration process associated with the detected trigger conditionincludes notifying a host to which the respective storage device isoperatively coupled of the trigger condition.

(C3) In some embodiments of the method of C1 or C1-1 or C1-2, enablingthe amelioration process associated with the detected trigger conditionincludes: (1) receiving a query from a host to which the respectivestorage device is operatively coupled, and (2) in response to receivingthe query, reporting the trigger condition.

(C4) In some embodiments of the method of C1 or C1-1 or C1-2, enablingthe amelioration process associated with the detected trigger conditionincludes: (1) receiving a command from a host to which the respectivestorage device is operatively coupled, and (2) in response to receivingthe command, sending a response to the command and a notification of thetrigger condition.

(C5) In some embodiments of the method of C1 or C1-1 or C1-2, enablingthe amelioration process associated with the detected trigger conditionincludes: (1) receiving a command from a host to which the respectivestorage device is operatively coupled, and (2) in response to receivingthe command, sending a response to the command and a notification thatprompts the host to obtain information with respect to the triggercondition.

(C6) In some embodiments of the method of any of C2 to C5, the hostincludes a client on behalf of which data is stored in the storagesystem.

(C7) In some embodiments of the method of any of C2 to C5, the hostincludes a storage system controller of the storage system.

(C8) In some embodiments of the method of any of C2 to C5, the hostincludes a cluster controller of the storage system.

(C9) In some embodiments of the method of any of C1 to C8, enabling theamelioration process associated with the detected trigger conditionincludes scheduling the amelioration process to be performed on therespective storage device.

(C10) In some embodiments of the method of any of C1 to C9, enabling theamelioration process associated with the detected trigger conditionincludes determining one or more parameters for the ameliorationprocess.

(C11) In some embodiments of the method of C10, enabling theamelioration process associated with the detected trigger conditionfurther includes reporting at least a subset of the one or moreparameters for the amelioration process.

(C12) In some embodiments of the method of any of C1 to C11, obtainingone or more metrics of the respective storage device includes obtainingat least one metric, of the one or more metrics, for each memory portionof a plurality of memory portions of the respective storage device.

(C13) In some embodiments of the method of any of C1 to C12, the one ormore metrics of the respective storage device include one or more statusmetrics corresponding to the respective storage device's ability toretain data.

(C14) In some embodiments of the method of any of C1 to C13, the one ormore metrics of the respective storage device include one or moreperformance metrics corresponding to performance of the respectivestorage device.

(C15) In some embodiments of the method of any of C1 to C14, the one ormore metrics of the respective storage device include one or more wearmetrics corresponding to wear on the respective storage device.

(C16) In some embodiments of the method of any of C1 to C15, the one ormore metrics of the respective storage device include one or more timemetrics.

(C17) In some embodiments of the method of any of C1 to C16, the one ormore metrics of the respective storage device include values of the oneor more metrics from more than one time.

(C18) In some embodiments of the method of any of C1 to C17, the methodfurther includes, after enabling the amelioration process: (1)re-evaluating the trigger condition in accordance with the one or moremetrics of the respective storage device, and (2) in accordance with adetermination that the trigger condition is no longer valid, abortingthe amelioration process to reduce declared capacity of the non-volatilememory of the respective storage device.

(C19) In some embodiments of the method of any of C1 to C18, theobtaining, the enabling, or both the obtaining and the enabling areperformed by one or more subsystems of the storage system distinct fromthe plurality of storage devices.

(C20) In some embodiments of the method of any of C1 to C19, therespective storage device comprises one or more flash memory devices.

(C21) In another aspect, a storage system includes (1) non-volatilememory, (2) one or more processors, and (3) controller memory storingone or more programs, which when executed by the one or more processorscause the storage system to perform or control performance of any of themethods C1 to C20 described herein.

(C23) In yet another aspect, any of the methods C1 to C20 describedabove are performed by a storage system including means for performingany of the methods described herein.

(C25) In yet another aspect, some embodiments include a non-transitorycomputer readable storage medium, storing one or more programsconfigured for execution by one or more processors of a storage system,the one or more programs including instructions for performing any ofthe methods described herein.

(C26) In yet another aspect, a storage system includes (1) a pluralityof storage devices, (2) one or more subsystems having one or moreprocessors, and (3) memory storing one or more programs, which whenexecuted by the one or more processors cause the one or more subsystemsto perform or control performance of any of the methods C1 to C20described herein.

In yet another aspect, a host system includes (1) an interface foroperatively coupling to a storage system, (2) one or more processors,and (3) controller memory storing one or more programs, which whenexecuted by the one or more processors cause the host system to performor control performance of any of the methods C1 to C20 described herein.

In yet another aspect, some embodiments include a non-transitorycomputer readable storage medium, storing one or more programsconfigured for execution by one or more processors of a host system, theone or more programs including instructions for performing any of themethods described herein.

The various embodiments described herein include systems, methods and/ordevices used to enable notification of a trigger condition to reducedeclared capacity of a storage device. Some embodiments include systems,methods and/or devices to notify a host to which a storage device isoperatively coupled of a trigger condition for reducing declaredcapacity of non-volatile memory of the storage device.

(D1) More specifically, some embodiments include a method of managing astorage system. In some embodiments, the method includes, at a storagedevice of the storage system, the storage device including non-volatilememory: (1) detecting a trigger condition for reducing declared capacityof the non-volatile memory of the storage device, and (2) notifying ahost to which the storage device is operatively coupled of the triggercondition for reducing declared capacity of the non-volatile memory ofthe storage device, the trigger condition for enabling performance of anamelioration process to reduce declared capacity of the non-volatilememory of the storage device. In some embodiments, the ameliorationprocess is performed, at least in part, by an apparatus other than thestorage device (e.g., performed at least in part by the host, or by astorage system controller or by a cluster controller of a data storagesystem that includes at least one storage device distinct from thestorage device).

(D1-1) In some embodiments of the method of D1, the method furtherincludes: (1) prior to detecting the trigger condition, detecting afirst wear condition of the non-volatile memory of the storage device,wherein a total storage capacity of the non-volatile memory of thestorage device includes declared capacity and over-provisioning, and (2)in response to detecting the first wear condition, performing a remedialaction that reduces over-provisioning of the non-volatile memory of thestorage device without reducing declared capacity of the non-volatilememory of the storage device.

(D1-2) In some embodiments of the method of D1-1, detecting the triggercondition includes detecting a second wear condition distinct from thefirst wear condition.

(D2) In some embodiments of the method of D1 or D1-1 or D1-2, the hostincludes a client on behalf of which data is stored in the storagesystem.

(D3) In some embodiments of the method of D1 or D1-1 or D1-2, the hostincludes a storage system controller of the storage system.

(D4) In some embodiments of the method of D1 or D1-1 or D1-2, the hostincludes a cluster controller of the storage system.

(D5) In some embodiments of the method of any of D1 to D4, notifying thehost of the trigger condition for reducing declared capacity of thenon-volatile memory of the storage device includes notifying the hostwith an unsolicited communication.

(D6) In some embodiments of the method of any of D1 to D4, notifying thehost of the trigger condition for reducing declared capacity of thenon-volatile memory of the storage device includes: (1) receiving aquery from the host, and (2) in response to receiving the query,reporting the trigger condition.

(D7) In some embodiments of the method of any of D1 to D4, notifying thehost of the trigger condition for reducing declared capacity of thenon-volatile memory of the storage device includes: (1) receiving acommand from the host, and (2) in response to receiving the command,sending a response to the command and a notification of the triggercondition.

(D8) In some embodiments of the method of any of D1 to D4, notifying thehost of the trigger condition for reducing declared capacity of thenon-volatile memory of the storage device includes: (1) receiving acommand from the host, and (2) in response to receiving the command,sending a response to the command and a notification that prompts thehost to obtain information with respect to the trigger condition.

(D9) In some embodiments of the method of any of D1 to D8, notifying thehost of the trigger condition for reducing declared capacity of thenon-volatile memory of the storage device further includes notifying thehost that the storage device is in read-only mode.

(D10) In some embodiments of the method of any of D1 to D9, the triggercondition is detected by the storage device in accordance with one ormore metrics of the storage device.

(D11) In some embodiments of the method of D10, the method furtherincludes, after notifying the host of the trigger condition for reducingdeclared capacity of the non-volatile memory of the storage device: (1)re-evaluating the trigger condition in accordance with the one or moremetrics of the storage device, and (2) in accordance with adetermination that the trigger condition is no longer valid, notifyingthe host of an absence of the trigger condition for reducing declaredcapacity of the non-volatile memory of the storage device.

(D12) In some embodiments of the method of any of D1 to D11, theamelioration process to reduce declared capacity of the non-volatilememory of the storage device includes a process to reduce utilization ofthe non-volatile memory of the storage device.

(D13) In some embodiments of the method of any of D1 to D12, the storagedevice comprises one or more flash memory devices.

(D14) In another aspect, a storage device includes (1) non-volatilememory (e.g., comprising one or more non-volatile storage devices, suchas flash memory devices), (2) one or more processors, and (3) controllermemory (e.g., non-volatile memory or volatile memory in or coupled tothe controller) storing one or more programs, which when executed by theone or more processors cause the storage device to perform or controlperformance of any of the methods D1 to D13 described herein.

(D16) In yet another aspect, any of the methods D1 to D13 describedabove are performed by a storage device including means for performingany of the methods described herein.

(D18) In yet another aspect, a storage system includes (1) a storagemedium (e.g., comprising one or more non-volatile storage devices, suchas flash memory devices), (2) one or more processors, and (3) memory(e.g., non-volatile memory or volatile memory in the storage system)storing one or more programs, which when executed by the one or moreprocessors cause the storage system to perform or control performance ofany of the methods D1 to D13 described herein.

(D19) In yet another aspect, some embodiments include a non-transitorycomputer readable storage medium, storing one or more programsconfigured for execution by one or more processors of a storage device,the one or more programs including instructions for performing any ofthe methods described herein.

The various embodiments described herein include systems, methods and/ordevices used to enable notification of a trigger condition to reducedeclared capacity of a storage device in a multi-storage-device storagesystem. Some embodiments include systems, methods and/or devices tonotify a host to which a respective storage device of a plurality ofstorage devices of a storage system is operatively coupled of a triggercondition for reducing declared capacity of non-volatile memory of therespective storage device.

(E1) More specifically, some embodiments include a method of managing astorage system. In some embodiments, the method includes: (1) obtaining,for each storage device of a plurality of storage devices of the storagesystem, one or more metrics of the storage device, the storage deviceincluding non-volatile memory, (2) detecting a trigger condition forreducing declared capacity of the non-volatile memory of a respectivestorage device of the plurality of storage devices of the storagesystem, the trigger condition detected in accordance with the one ormore metrics of two or more of the storage devices of the plurality ofstorage devices in the storage system, and (3) notifying a host to whichthe respective storage device is operatively coupled of the triggercondition for reducing declared capacity of the non-volatile memory ofthe respective storage device, the trigger condition for enablingperformance of an amelioration process to reduce declared capacity ofthe non-volatile memory of the respective storage device. In someembodiments, or in some circumstances, the notification of the triggercondition causes performance of the amelioration process to be enabled.

(E1-1) In some embodiments of the method of E1, the method furtherincludes: (1) prior to detecting the trigger condition, detecting afirst wear condition of the non-volatile memory of the respectivestorage device, wherein a total storage capacity of the non-volatilememory of the respective storage device includes declared capacity andover-provisioning; and (2) in response to detecting the first wearcondition, performing a remedial action that reduces over-provisioningof the non-volatile memory of the respective storage device withoutreducing declared capacity of the non-volatile memory of the respectivestorage device.

(E1-2) In some embodiments of the method of E1-1, detecting the triggercondition includes detecting a second wear condition distinct from thefirst wear condition.

(E2) In some embodiments of the method of E1 or E1-1 or E1-2, the hostincludes a client on behalf of which data is stored in the storagesystem.

(E3) In some embodiments of the method of E1 or E1-1 or E1-2, the hostincludes a storage system controller of the storage system.

(E4) In some embodiments of the method of E1 or E1-1 or E1-2, the hostincludes a cluster controller of the storage system.

(E5) In some embodiments of the method of any of E1 to E4, notifying thehost of the trigger condition for reducing declared capacity of thenon-volatile memory of the respective storage device includes notifyingthe host with an unsolicited communication.

(E6) In some embodiments of the method of any of E1 to E4, notifying thehost of the trigger condition for reducing declared capacity of thenon-volatile memory of the respective storage device includes: (1)receiving a query from the host, and (2) in response to receiving thequery, reporting the trigger condition.

(E7) In some embodiments of the method of any of E1 to E4, notifying thehost of the trigger condition for reducing declared capacity of thenon-volatile memory of the respective storage device includes: (1)receiving a command from the host, and (2) in response to receiving thecommand, sending a response to the command and a notification of thetrigger condition.

(E8) In some embodiments of the method of any of E1 to E4, notifying thehost of the trigger condition for reducing declared capacity of thenon-volatile memory of the respective storage device includes: (1)receiving a command from the host, and (2) in response to receiving thecommand, sending a response to the command and a notification thatprompts the host to obtain information with respect to the triggercondition.

(E9) In some embodiments of the method of any of E1 to E4, notifying thehost of the trigger condition for reducing declared capacity of thenon-volatile memory of the respective storage device includes notifyingthe host that the respective storage device is in read-only mode.

(E10) In some embodiments of the method of any of E1 to E9, the methodfurther includes, after notifying the host of the trigger condition forreducing declared capacity of the non-volatile memory of the respectivestorage device: (1) re-evaluating the trigger condition in accordancewith the one or more metrics of the two or more storage devices of theplurality of storage devices in the storage system, and (2) inaccordance with a determination that the trigger condition is no longervalid, notifying the host of an absence of the trigger condition forreducing declared capacity of the non-volatile memory of the respectivestorage device.

(E11) In some embodiments of the method of any of E1 to E10, theobtaining, the notifying, or both the obtaining and the notifying areperformed by one or more subsystems of the storage system distinct fromthe plurality of storage devices.

(E12) In some embodiments of the method of any of E1 to E11, theamelioration process to reduce declared capacity of the non-volatilememory of the respective storage device includes a process to reduceutilization of the non-volatile memory of the respective storage device.

(E13) In some embodiments of the method of any of E1 to E12, therespective storage device comprises one or more flash memory devices.

(E14) In another aspect, a storage system includes (1) non-volatilememory (e.g., comprising one or more non-volatile storage devices, suchas flash memory devices), (2) one or more processors, and (3) controllermemory (e.g., non-volatile memory or volatile memory in or coupled to acontroller of the storage system) storing one or more programs, whichwhen executed by the one or more processors cause the storage system toperform or control performance of any of the methods E1 to E13 describedherein.

(E16) In yet another aspect, any of the methods E1 to E13 describedabove are performed by a storage system including means for performingany of the methods described herein.

(E18) In yet another aspect, some embodiments include a non-transitorycomputer readable storage medium, storing one or more programsconfigured for execution by one or more processors of a storage system,the one or more programs including instructions for performing any ofthe methods described herein.

(E19) In yet another aspect, a storage system includes (1) a pluralityof storage devices, (2) one or more subsystems having one or moreprocessors, and (3) memory (e.g., non-volatile memory or volatile memoryin the storage system) storing one or more programs, which when executedby the one or more processors cause the one or more subsystems toperform or control performance of any of the methods E1 to E13 describedherein.

In yet another aspect, a host system includes (1) an interface foroperatively coupling to a storage system, (2) one or more processors,and (3) controller memory storing one or more programs, which whenexecuted by the one or more processors cause the host system to performor control performance of any of the methods E1 to E13 described herein.

In yet another aspect, some embodiments include a non-transitorycomputer readable storage medium, storing one or more programsconfigured for execution by one or more processors of a host system, theone or more programs including instructions for performing any of themethods described herein.

Numerous details are described herein in order to provide a thoroughunderstanding of the example embodiments illustrated in the accompanyingdrawings. However, some embodiments may be practiced without many of thespecific details, and the scope of the claims is only limited by thosefeatures and aspects specifically recited in the claims. Furthermore,well-known methods, components, and circuits have not been described inexhaustive detail so as not to unnecessarily obscure pertinent aspectsof the embodiments described herein.

Data storage systems, including those described below, use a variety oftechniques to avoid data loss caused by a variety of failure mechanisms,including storage media failure, communication failures, and failures atthe system and subsystem level. A common feature of these mechanisms isthe use of data redundancy to protect data, to compensate for actual andpotential data errors (e.g., media errors, lost data, transmissionerrors, inaccessible data, etc.). One class of redundancy mechanisms isknown as error correction codes (ECCs). Numerous types of errorcorrection codes are well known (e.g., BCH, LDPC, Reed-Solomon, etc.),as are numerous schemes for storing them with or in conjunction with thedata that is being protected. Another class of redundancy mechanisms iserasure codes (e.g., pyramid, fountain, partial MDS, locally repairable,simple regenerating, etc.)

Another type or level of redundancy mechanism is typically called RAID(redundant array of independent disks), even when the storage media arenot “disks” in the traditional sense. There are multiple forms of RAID,or RAID schemes, providing different levels of data protection (e.g.,RAID-1, RAID-5, RAID-6, RAID-10, etc.). Typically, in systems that useRAID, “stripes” of data stored in multiple distinct storage locationsare treated as a set, and stored with sufficient redundant data that anydata in a stripe that would have been lost, in a partial or completefailure of any one of the storage locations, is recovered using theother data in the stripe, possibly including the redundant data.

A third type of redundancy mechanism is replication of data to multiplestorage locations, typically in distinct failure domains. Systemsimplementing this type of redundancy mechanism typically store three ormore replicas of each data set or data item. Typically either eachreplica is in a distinct failure domain from the other replicas, or atleast one replica is in a distinct failure domain from the otherreplicas.

The embodiments described below work in conjunction with the dataredundancy mechanisms described above (used alone or in combination).Some of the data storage systems described below have an architecture orconfiguration designed to implement a particular redundancy mechanism.Furthermore, some of the embodiments described below may utilize morethan one of the redundancy mechanisms described above, either alone orin combination. Furthermore, some of the embodiments are able to storedata encoded with different redundancy mechanisms simultaneously.Furthermore, even within a single mechanism, the selection of parameters(i.e., codeword size relative to data size) may vary dynamically. Hence,altering the redundancy mechanism directly affects the amount of datastored and in turn the utilization.

FIG. 1A is a block diagram illustrating data storage system 100, inaccordance with some embodiments. While some example features areillustrated, various other features have not been illustrated for thesake of brevity and so as not to obscure pertinent aspects of theexample embodiments disclosed herein. To that end, as a non-limitingexample, data storage system 100 includes a storage device 120, whichincludes a storage controller 124 and a storage medium 130, and is usedin conjunction with or includes a computer system 110. In someembodiments, storage medium 130 is a single flash memory device while inother embodiments storage medium 130 includes a plurality of flashmemory devices. In some embodiments, storage medium 130 is NAND-typeflash memory or NOR-type flash memory. In some embodiments, storagemedium 130 includes one or more three-dimensional (3D) memory devices,as further defined herein. Further, in some embodiments storagecontroller 124 is a solid-state drive (SSD) controller. However, othertypes of storage media may be included in accordance with aspects of awide variety of embodiments (e.g., PCRAM, ReRAM, STT-RAM, etc.). In someembodiments, a flash memory device includes one or more flash memorydie, one or more flash memory packages, one or more flash memorychannels or the like. In some embodiments, data storage system 100 cancontain one or more storage device 120 s.

Computer system 110 is coupled to storage controller 124 through dataconnections 101. However, in some embodiments computer system 110includes storage controller 124, or a portion of storage controller 124,as a component and/or a subsystem. For example, in some embodiments,some or all of the functionality of storage controller 124 isimplemented by software executed on computer system 110. Computer system110 may be any suitable computer device, such as a computer, a laptopcomputer, a tablet device, a netbook, an internet kiosk, a personaldigital assistant, a mobile phone, a smart phone, a gaming device, acomputer server, or any other computing device. Computer system 110 issometimes called a host, host system, client, or client system. In someembodiments, computer system 110 is a server system, such as a serversystem in a data center. In some embodiments, computer system 110includes one or more processors, one or more types of memory, a displayand/or other user interface components such as a keyboard, a touchscreen display, a mouse, a track-pad, a digital camera and/or any numberof supplemental devices to add functionality. In some embodiments,computer system 110 does not have a display and other user interfacecomponents.

Storage medium 130 is coupled to storage controller 124 throughconnections 103. Connections 103 are sometimes called data connections,but typically convey commands in addition to data, and optionally conveymetadata, error correction information and/or other information inaddition to data values to be stored in storage medium 130 and datavalues read from storage medium 130. In some embodiments, however,storage controller 124 and storage medium 130 are included in the samedevice (i.e., an integral device) as components thereof. Furthermore, insome embodiments, storage controller 124 and storage medium 130 areembedded in a host device (e.g., computer system 110), such as a mobiledevice, tablet, other computer or computer controlled device, and themethods described herein are performed, at least in part, by theembedded memory controller. Storage medium 130 may include any number(i.e., one or more) of memory devices including, without limitation,non-volatile semiconductor memory devices, such as flash memorydevice(s). For example, flash memory device(s) can be configured forenterprise storage suitable for applications such as cloud computing,for database applications, primary and/or secondary storage, or forcaching data stored (or to be stored) in secondary storage, such as harddisk drives. Additionally and/or alternatively, flash memory device(s)can also be configured for relatively smaller-scale applications such aspersonal flash drives or hard-disk replacements for personal, laptop,and tablet computers. In some embodiments, storage medium 130 includesone or more three-dimensional (3D) memory devices, as further definedherein.

Storage medium 130 is divided into a number of addressable andindividually selectable blocks, such as selectable portion 131. In someembodiments, the individually selectable blocks are the minimum sizeerasable units in a flash memory device. In other words, each blockcontains the minimum number of memory cells that can be erasedsimultaneously. Each block is usually further divided into a pluralityof pages and/or word lines, where each page or word line is typically aninstance of the smallest individually accessible (readable) portion in ablock. In some embodiments (e.g., using some types of flash memory), thesmallest individually accessible unit of a data set, however, is asector, which is a subunit of a page. That is, a block includes aplurality of pages, each page contains a plurality of sectors, and eachsector is the minimum unit of data for reading data from the flashmemory device.

As noted above, while data storage densities of non-volatilesemiconductor memory devices are generally increasing, a drawback ofincreasing storage density is that the stored data is more prone tobeing stored and/or read erroneously. In some embodiments, error controlcoding can be utilized to limit the number of uncorrectable errors thatare introduced by electrical fluctuations, defects in the storagemedium, operating conditions, device history, write-read circuitry,etc., or a combination of these and various other factors.

In some embodiments, storage controller 124 includes a management module121-1, a host interface 129, a storage medium I/O interface 128, andadditional module(s) 125. Storage controller 124 may include variousadditional features that have not been illustrated for the sake ofbrevity and so as not to obscure pertinent features of the exampleembodiments disclosed herein, and a different arrangement of featuresmay be possible. Host interface 129 provides an interface to computersystem 110 through data connections 101. Similarly, storage medium I/O128 provides an interface to storage medium 130 though connections 103.In some embodiments, storage medium I/O 128 includes read and writecircuitry, including circuitry capable of providing reading signals tostorage medium 130 (e.g., reading threshold voltages for NAND-type flashmemory).

In some embodiments, management module 121-1 includes one or moreprocessing units (CPUs, also sometimes called processors) 122-1configured to execute instructions in one or more programs (e.g., inmanagement module 121-1). In some embodiments, the one or more CPUs122-1 are shared by one or more components within, and in some cases,beyond the function of storage controller 124. Management module 121-1is coupled to host interface 129, additional module(s) 125 and storagemedium I/O 128 in order to coordinate the operation of these components.In some embodiments, one or more modules of management module 121-1 areimplemented in management module 121-2 of computer system 110. In someembodiments, one or more processors of computer system 110 (not shown)are configured to execute instructions in one or more programs (e.g., inmanagement module 121-2). Management module 121-2 is coupled to storagedevice 120 in order to manage the operation of storage device 120.

Additional module(s) 125 are coupled to storage medium I/O 128, hostinterface 129, and management module 121-1. As an example, additionalmodule(s) 125 may include an error control module to limit the number ofuncorrectable errors inadvertently introduced into data during writes tomemory or reads from memory. In some embodiments, additional module(s)125 are executed in software by the one or more CPUs 122-1 of managementmodule 121-1, and, in other embodiments, additional module(s) 125 areimplemented in whole or in part using special purpose circuitry (e.g.,to perform encoding and decoding functions). In some embodiments,additional module(s) 125 are implemented in whole or in part by softwareexecuted on computer system 110.

In some embodiments, an error control module, included in additionalmodule(s) 125, includes an encoder and a decoder. In some embodiments,the encoder encodes data by applying an error control code to produce acodeword, which is subsequently stored in storage medium 130. When theencoded data (e.g., one or more codewords) is read from storage medium130, the decoder applies a decoding process to the encoded data torecover the data, and to correct errors in the recovered data within theerror correcting capability of the error control code. Those skilled inthe art will appreciate that various error control codes have differenterror detection and correction capacities, and that particular codes areselected for various applications for reasons beyond the scope of thisdisclosure. As such, an exhaustive review of the various types of errorcontrol codes is not provided herein. Moreover, those skilled in the artwill appreciate that each type or family of error control codes may haveencoding and decoding algorithms that are particular to the type orfamily of error control codes. On the other hand, some algorithms may beutilized at least to some extent in the decoding of a number ofdifferent types or families of error control codes. As such, for thesake of brevity, an exhaustive description of the various types ofencoding and decoding algorithms generally available and known to thoseskilled in the art is not provided herein.

In some embodiments, during a write operation, host interface 129receives data to be stored in storage medium 130 from computer system110. The data received by host interface 129 is made available to anencoder (e.g., in additional module(s) 125), which encodes the data toproduce one or more codewords. The one or more codewords are madeavailable to storage medium I/O 128, which transfers the one or morecodewords to storage medium 130 in a manner dependent on the type ofstorage medium being utilized.

In some embodiments, a read operation is initiated when computer system(host) 110 sends one or more host read commands (e.g., via dataconnections 101, or alternatively a separate control line or bus) tostorage controller 124 requesting data from storage medium 130. Storagecontroller 124 sends one or more read access commands to storage medium130, via storage medium I/O 128, to obtain raw read data in accordancewith memory locations (addresses) specified by the one or more host readcommands. Storage medium I/O 128 provides the raw read data (e.g.,comprising one or more codewords) to a decoder (e.g., in additionalmodule(s) 125). If the decoding is successful, the decoded data isprovided to host interface 129, where the decoded data is made availableto computer system 110. In some embodiments, if the decoding is notsuccessful, storage controller 124 may resort to a number of remedialactions or provide an indication of an irresolvable error condition.

As explained above, a storage medium (e.g., storage medium 130) isdivided into a number of addressable and individually selectable blocksand each block is optionally (but typically) further divided into aplurality of pages and/or word lines and/or sectors. While erasure of astorage medium is performed on a block basis, in many embodiments,reading and programming of the storage medium is performed on a smallersubunit of a block (e.g., on a page basis, word line basis, or sectorbasis). In some embodiments, the smaller subunit of a block consists ofmultiple memory cells (e.g., single-level cells or multi-level cells).In some embodiments, programming is performed on an entire page. In someembodiments, a multi-level cell (MLC) NAND flash typically has fourpossible states per cell, yielding two bits of information per cell.Further, in some embodiments, a MLC NAND has two page types: (1) a lowerpage (sometimes called fast page), and (2) an upper page (sometimescalled slow page). In some embodiments, a triple-level cell (TLC) NANDflash has eight possible states per cell, yielding three bits ofinformation per cell. Although the description herein uses TLC, MLC, andSLC as examples, those skilled in the art will appreciate that theembodiments described herein may be extended to memory cells that havemore than eight possible states per cell, yielding more than three bitsof information per cell.

The encoding format of the storage media (i.e., TLC, MLC, or SLC and/ora chose data redundancy mechanism) is a choice made when data isactually written to the storage media. Often in this specification thereis described an event, condition, or process that is said to set theencoding format, alter the encoding format of the storage media, etc. Itshould be recognized that the actual process may involve multiple steps,e.g., erasure of the previous contents of the storage media followed bythe data being written using the new encoding format and that theseoperations may be separated in time from the initiating event, conditionor procedure.

As an example, if data is written to a storage medium in pages, but thestorage medium is erased in blocks, pages in the storage medium maycontain invalid (e.g., stale) data, but those pages cannot beoverwritten until the whole block containing those pages is erased. Inorder to write to the pages with invalid data, the pages (if any) withvalid data in that block are read and re-written to a new block and theold block is erased (or put on a queue for erasing). This process iscalled garbage collection. After garbage collection, the new blockcontains the pages with valid data and may have free pages that areavailable for new data to be written, and the old block can be erased soas to be available for new data to be written. Since flash memory canonly be programmed and erased a limited number of times, the efficiencyof the algorithm used to pick the next block(s) to re-write and erasehas a significant impact on the lifetime and reliability of flash-basedstorage systems.

FIG. 1B is a block diagram illustrating data storage system 140, inaccordance with some embodiments. While some example features areillustrated, various other features have not been illustrated for thesake of brevity and so as not to obscure pertinent aspects of theexample embodiments disclosed herein. To that end, as a non-limitingexample, data storage system 140 (sometimes called a scale-up storagesystem, a single node storage system, etc.) includes a plurality ofstorage devices 160 (e.g., storage devices 160-1 to 160-m) and a storagesystem controller 150, and is used in conjunction with a computer system142. In some embodiments, storage devices 160 include management modules161 (e.g., storage device 160-1 includes management module 161-1 andstorage device 160-m includes management module 161-m). Some of thefeatures described above with respect to storage device 120 (FIG. 1A)and management module 121-1 (FIG. 1A) are applicable to storage devices160 and management modules 161, respectively, and for sake of brevityand simplicity, the details are not repeated here.

Computer system 142 is coupled to storage system controller 150 throughconnections 141. However, in some embodiments computer system 142includes a part of or the entire storage system controller 150 as acomponent and/or a subsystem. For example, in some embodiments, some orall of the functionality of storage system controller 150 is implementedby software executed on computer system 142. Computer system 142 may beany suitable computer device, such as a computer, a laptop computer, atablet device, a netbook, an internet kiosk, a personal digitalassistant, a mobile phone, a smart phone, a gaming device, a computerserver, or any other computing device. In some embodiments, computersystem 142 is a server system, such as a server system in a data center.Computer system 142 is sometimes called a host, host system, client, orclient system. In some embodiments, computer system 142 includes one ormore processors, one or more types of memory, a display and/or otheruser interface components such as a keyboard, a touch screen display, amouse, a track-pad, a digital camera and/or any number of supplementaldevices to add functionality. In some embodiments, computer system 142does not have a display and other user interface components.

In some embodiments, storage system controller 150 includes a systemmanagement module 151-1, and additional module(s) 155. Storage systemcontroller 150 may include various additional features that have notbeen illustrated for the sake of brevity and so as not to obscurepertinent features of the example embodiments disclosed herein, and adifferent arrangement of features may be possible. For example, in someembodiments, storage system controller 150 additionally includes aninterface for each of the storage devices 160 coupled to storage systemcontroller 150. Storage devices 160 are coupled to storage systemcontroller 150 through connections 143 (e.g., storage device 160-1 iscoupled to storage system controller 150 through connections 143-1 andstorage device 160-m is coupled to storage system controller 150 throughconnections 143-m). In some embodiments, connections 143-1 through 143-mare implemented as a communication media over which commands and dataare communicated using a protocol such as SCSI, SATA, Infiniband,Ethernet, Token Ring, or the like.

In some embodiments, system management module 151-1 includes one or moreprocessing units (CPUs, also sometimes called processors) 152-1configured to execute instructions in one or more programs (e.g., insystem management module 151-1). In some embodiments, the one or moreCPUs 152-1 are shared by one or more components within, and in somecases, beyond the function of storage system controller 150. Systemmanagement module 151-1 is coupled to additional module(s) 155 in orderto coordinate the operation of these components. In some embodiments,one or more modules of system management module 151-1 are implemented insystem management module 151-2 of computer system 142 (sometimes calleda host, host system, client, or client system). In some embodiments, oneor more processors (sometimes called CPUs or processing units) ofcomputer system 142 (not shown) are configured to execute instructionsin one or more programs (e.g., in system management module 151-2).System management module 151-2 is coupled to storage system controller150 in order to manage the operation of storage system controller 150.

Additional module(s) 155 are coupled to system management module 151-1.In some embodiments, additional module(s) 155 are executed in softwareby the one or more CPUs 152-1 of system management module 151-1, and, inother embodiments, additional module(s) 155 are implemented in whole orin part using special purpose circuitry. In some embodiments, additionalmodule(s) 155 are implemented in whole or in part by software executedon computer system 142.

During a write operation, storage system controller 150 receives data tobe stored in storage devices 160 from computer system 142 (sometimescalled a host, host system, client, or client system). In someembodiments, storage system controller 150 maps a virtual logicaladdress from computer system 142 to an address, which determines oridentifies the one or more of storage devices 160 to which to write thedata.

A read operation is initiated when computer system 142 sends one or morehost read commands to storage system controller 150 requesting data fromstorage devices 160. In some embodiments, storage system controller 150maps a virtual logical address from computer system 142 to an address,which determines or identifies the one or more of storage devices 160from which to read the requested data.

FIG. 1C is a block diagram illustrating an implementation of datastorage system 170, in accordance with some embodiments. While someexample features are illustrated, various other features have not beenillustrated for the sake of brevity and so as not to obscure pertinentaspects of the example embodiments disclosed herein. To that end, as anon-limiting example, data storage system 170 (sometimes called ascale-out storage system, a multiple node storage system or a storagecluster system) includes a plurality of storage subsystems 192 (e.g.,storage subsystems 192-1 to 192-s) and a cluster controller 180, and isused in conjunction with a computer system 172. In some embodiments,storage subsystems 192 include storage system controllers 190 andstorage devices 194 (e.g., storage subsystem 192-1 includes storagesystem controller 190-1 and storage devices 194-1 through 194-n). Someof the features described above with respect to data storage system 140(FIG. 1B) are applicable to storage subsystems 192, and for sake ofbrevity, the details are not repeated here. In some embodiments theremay be a plurality of cluster controllers 180 that may communicate witheach other to coordinate their activities.

Computer system 172 is coupled to cluster controller 180 throughconnections 171. However, in some embodiments computer system 172includes cluster controller 180 as a component and/or a subsystem. Forexample, in some embodiments, some or all of the functionality ofcluster controller 180 is implemented by software executed on computersystem 172. Computer system 172 may be any suitable computer device,such as a computer, a laptop computer, a tablet device, a netbook, aninternet kiosk, a personal digital assistant, a mobile phone, a smartphone, a gaming device, a computer server, or any other computingdevice. In some embodiments, computer system 172 is a server system,such as a server system in a data center. Computer system 172 issometimes called a host, host system, client, or client system. In someembodiments, computer system 172 includes one or more processors, one ormore types of memory, a display and/or other user interface componentssuch as a keyboard, a touch screen display, a mouse, a track-pad, adigital camera and/or any number of supplemental devices to addfunctionality. In some embodiments, computer system 172 does not have adisplay and other user interface components.

In some embodiments, cluster controller 180 includes a clustermanagement module 181-1, and additional module(s) 185. Clustercontroller 180 may include various additional features that have notbeen illustrated for the sake of brevity and so as not to obscurepertinent features of the example embodiments disclosed herein, and adifferent arrangement of features may be possible. For example, in someembodiments, cluster controller 180 additionally includes an interfacefor each of the storage subsystems 192 coupled to cluster controller180. Storage subsystems 192 are coupled to cluster controller 180through connections 173 (e.g., storage subsystem 192-1 is coupled tocluster controller 180 through connections 173-1 and storage subsystem192-s is coupled to cluster controller 180 through connections 173-s).In some embodiments, connections 173 may be implemented as a sharedcommunication network, e.g., Token Ring, Ethernet, Infiniband, etc.

In some embodiments, cluster management module 181-1 includes one ormore processing units (CPUs, also sometimes called processors) 182-1configured to execute instructions in one or more programs (e.g., incluster management module 181-1). In some embodiments, the one or moreCPUs 182-1 are shared by one or more components within, and in somecases, beyond the function of cluster controller 180. Cluster managementmodule 181-1 is coupled to additional module(s) 185 in order tocoordinate the operation of these components. In some embodiments, oneor more modules of cluster management module 181-1 are implemented incluster management module 181-2 of computer system 172 (sometimes calleda host, host system, client, or client system). In some embodiments, oneor more processors (sometimes called CPUs or processing units) ofcomputer system 172 (not shown) are configured to execute instructionsin one or more programs (e.g., in cluster management module 181-2).Cluster management module 181-2 is coupled to cluster controller 180 inorder to manage the operation of cluster controller 180.

Additional module(s) 185 are coupled to cluster management module 181-1.In some embodiments, additional module(s) 185 are executed in softwareby the one or more CPUs 182-1 of cluster management module 181-1, and,in other embodiments, additional module(s) 185 are implemented in wholeor in part using special purpose circuitry. In some embodiments,additional module(s) 185 are implemented in whole or in part by softwareexecuted on computer system 172.

In some embodiments, during a write operation, cluster controller 180receives data to be stored in storage subsystems 192 from computersystem 172 (sometimes called a host, host system, client, or clientsystem). In some embodiments, cluster controller 180 maps a virtuallogical address from computer system 172 to an address formatunderstandable by storage subsystems 192 and to identify a storagesubsystem of storage subsystems 192 to which to write the data. In someembodiments, cluster controller 180 may convert the data to be storedinto a plurality of sets of data, each set of data is stored on onestorage subsystem of storage subsystems 192. In one embodiment, theconversion process may be as simple as a partitioning of the data to bestored. In another embodiment, the conversion process may redundantlyencode the data to be stored so as to provide enhanced data integrityand access in the face of failures of one or more storage subsystems ofstorage subsystems 192 or communication thereto.

In some embodiments, a read operation is initiated when computer system172 sends one or more host read commands to cluster controller 180requesting data from storage subsystems 192. In some embodiments,cluster controller 180 maps a virtual logical address from computersystem 172 to an address format understandable by storage subsystems192, to determine or identify the storage subsystem of storagesubsystems 192 from which to read the requested data. In someembodiments, more than one storage subsystem of storage subsystems 192may have data read in order to satisfy the read operation, e.g. for datareconstruction.

As used herein, the term “host” or “host system” may be construed tomean (1) a computer system (e.g., computer system 110, FIG. 1A, computersystem 142, FIG. 1B, or computer system 172, FIG. 1C) on behalf of whichdata is stored in a storage system (e.g., data storage system 100, FIG.1A, data storage system 140, FIG. 1B, or data storage system 170, FIG.1C), (2) a storage system controller (e.g., storage system controller150, FIG. 1B) of a storage system (e.g., data storage system 140, FIG.1B), (3) a cluster controller (e.g., cluster controller 180, FIG. 1C) ofa storage system (e.g., data storage system 170, FIG. 1C), and/or (4)any computing entity (e.g., a computer, a process running on a computer,a mobile phone, an internet kiosk, a tablet computer, a laptop computer,a desktop computer, a server computer, etc.) that is operatively coupledeither directly or indirectly to a storage system, depending on thecontext. For example, in some circumstances, with respect to datastorage system 140 (FIG. 1B), the term “host” may refer to computersystem 142 or storage system controller 150, depending on the context.As another example, in some circumstances, with respect to data storagesystem 170 (FIG. 1C), the term “host” may refer to computer system 172or cluster controller 180, depending on the context. Further, in somecontexts, the host is or includes a client or client system, on behalfof which data is stored in a storage system.

FIG. 2A-1 is a block diagram illustrating a management module 121-1, inaccordance with some embodiments, as shown in FIG. 1A. Management module121-1 typically includes one or more processing units (sometimes calledCPUs or processors) 122-1 for executing modules, programs and/orinstructions stored in memory 206-1 and thereby performing processingoperations, memory 206-1 (sometimes called controller memory), and oneor more communication buses 208-1 for interconnecting these components.The one or more communication buses 208-1 optionally include circuitry(sometimes called a chipset) that interconnects and controlscommunications between system components. Management module 121-1 iscoupled to host interface 129, additional module(s) 125, and storagemedium I/O 128 by the one or more communication buses 208-1. Memory206-1 includes high-speed random access memory, such as DRAM, SRAM, DDRRAM or other random access solid state memory devices, and may includenon-volatile memory, such as one or more magnetic disk storage devices,optical disk storage devices, flash memory devices, or othernon-volatile solid state storage devices. Memory 206-1 optionallyincludes one or more storage devices remotely located from the CPU(s)122-1. Memory 206-1, or alternatively the non-volatile memory device(s)within memory 206-1, comprises a non-transitory computer readablestorage medium. In some embodiments, memory 206-1, or the non-transitorycomputer readable storage medium of memory 206-1 stores the followingprograms, modules, and data structures, or a subset or superset thereof:

-   -   translation table 212-1 that is used for mapping logical        addresses to physical addresses (e.g., in some embodiments,        translation table 212-1 includes mapping table 402, FIG. 4);    -   data read module 214-1 that is used for reading data from one or        more codewords, pages or blocks in a storage medium (e.g.,        storage medium 130, FIG. 1A);    -   data write module 216-1 that is used for writing data to one or        more codewords, pages or blocks in a storage medium (e.g.,        storage medium 130, FIG. 1A);    -   data erase module 218-1 that is used for erasing data from one        or more blocks in a storage medium (e.g., storage medium 130,        FIG. 1A);    -   garbage collection module 220-1 that is used for garbage        collection for one or more blocks in a storage medium (e.g.,        storage medium 130, FIG. 1A);    -   metrics module 222-1 that is used for generating and/or        obtaining one or more metrics of a storage device (e.g., storage        device 120, FIG. 1A);    -   trigger detection module 224-1 that is used for detecting a        trigger condition (e.g., in accordance with one or more metrics        of a storage device);    -   enabling module 226-1 that is used for enabling an amelioration        process associated with a trigger condition (e.g., detected by        trigger detection module 224-1);    -   notification module 228-1 that is used for notifying a host to        which a storage device is operatively coupled of a trigger        condition (e.g., detected by trigger detection module 224-1)        and/or of an absence of the trigger condition;    -   amelioration module 230-1 that is used for performing an        amelioration process to reduce declared capacity of non-volatile        memory of a storage device (e.g., storage device 120, FIG. 1A),        optionally including:        -   detection module 231-1 that is used for detecting an            amelioration trigger for reducing declared capacity of the            non-volatile memory of the storage device;        -   utilization module 232-1 that is used for reducing            utilization of the non-volatile memory of the storage            device; and        -   capacity module 234-1 that is used for reducing declared            capacity of the non-volatile memory of the storage device.

Each of the above identified elements may be stored in one or more ofthe previously mentioned memory devices, and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures or modules, andthus various subsets of these modules may be combined or otherwisere-arranged in various embodiments. In some embodiments, memory 206-1may store a subset of the modules and data structures identified above.Furthermore, memory 206-1 may store additional modules and datastructures not described above. In some embodiments, the programs,modules, and data structures stored in memory 206-1, or thenon-transitory computer readable storage medium of memory 206-1, provideinstructions for implementing some of the methods described below. Insome embodiments, some or all of these modules may be implemented withspecialized hardware circuits that subsume part or all of the modulefunctionality.

Although FIG. 2A-1 shows management module 121-1 in accordance with someembodiments, FIG. 2A-1 is intended more as a functional description ofthe various features which may be present in management module 121-1than as a structural schematic of the embodiments described herein. Inpractice, and as recognized by those of ordinary skill in the art, theprograms, modules, and data structures shown separately could becombined and some programs, modules, and data structures could beseparated.

FIG. 2A-2 is a block diagram illustrating a management module 121-2 ofcomputer system 110 (FIG. 1A), in accordance with some embodiments.Management module 121-2 typically includes one or more processing units(sometimes called CPUs or processors) 122-2 for executing modules,programs and/or instructions stored in memory 206-2 and therebyperforming processing operations, memory 206-2, and one or morecommunication buses 208-2 for interconnecting these components. The oneor more communication buses 208-2 optionally include circuitry(sometimes called a chipset) that interconnects and controlscommunications between system components. Management module 121-2 iscoupled to storage device 120 by the one or more communication buses208-2. Memory 206-2 (sometimes called host memory) includes high-speedrandom access memory, such as DRAM, SRAM, DDR RAM or other random accesssolid state memory devices, and may include non-volatile memory, such asone or more magnetic disk storage devices, optical disk storage devices,flash memory devices, or other non-volatile solid state storage devices.Memory 206-2 optionally includes one or more storage devices remotelylocated from the CPU(s) 122-2. Memory 206-2, or alternatively thenon-volatile memory device(s) within memory 206-2, comprises anon-transitory computer readable storage medium. In some embodiments,memory 206-2, or the non-transitory computer readable storage medium ofmemory 206-2 stores the following programs, modules, and datastructures, or a subset or superset thereof:

-   -   translation table 212-2 that is used for mapping logical        addresses to physical addresses (e.g., in some embodiments,        translation table 212-2 includes mapping table 402, FIG. 4);    -   data read module 214-2 that is used for reading data from one or        more codewords, pages or blocks in a storage medium (e.g.,        storage medium 130, FIG. 1A);    -   data write module 216-2 that is used for writing data to one or        more codewords, pages or blocks in a storage medium (e.g.,        storage medium 130, FIG. 1A);    -   data erase module 218-2 that is used for erasing data from one        or more blocks in a storage medium (e.g., storage medium 130,        FIG. 1A);    -   garbage collection module 220-2 that is used for garbage        collection for one or more blocks in a storage medium (e.g.,        storage medium 130, FIG. 1A);    -   metrics module 222-2 that is used for generating and/or        obtaining one or more metrics of a storage device (e.g., storage        device 120, FIG. 1A);    -   trigger detection module 224-2 that is used for detecting a        trigger condition (e.g., in accordance with one or more metrics        of a storage device);    -   enabling module 226-2 that is used for enabling an amelioration        process associated with a trigger condition (e.g., detected by        trigger detection module 224-2);    -   notification module 228-2 that is used for notifying an        application, module or process, of the host (i.e., computer        system 110, FIG. 1A), of a trigger condition (e.g., detected by        trigger detection module 224-2) and/or of an absence of the        trigger condition;    -   amelioration module 230-2 that is used for performing an        amelioration process to reduce declared capacity of non-volatile        memory of a storage device (e.g., storage device 120, FIG. 1A),        optionally including:        -   detection module 231-2 that is used for detecting an            amelioration trigger for reducing declared capacity of the            non-volatile memory of the storage device;        -   utilization module 232-2 that is used for reducing            utilization of the non-volatile memory of the storage            device; and        -   capacity module 234-2 that is used for reducing declared            capacity of the non-volatile memory of the storage device.

Each of the above identified elements may be stored in one or more ofthe previously mentioned memory devices, and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures or modules, andthus various subsets of these modules may be combined or otherwisere-arranged in various embodiments. In some embodiments, memory 206-2may store a subset of the modules and data structures identified above.Furthermore, memory 206-2 may store additional modules and datastructures not described above. In some embodiments, the programs,modules, and data structures stored in memory 206-2, or thenon-transitory computer readable storage medium of memory 206-2, provideinstructions for implementing some of the methods described below. Insome embodiments, some or all of these modules may be implemented withspecialized hardware circuits that subsume part or all of the modulefunctionality.

Although FIG. 2A-2 shows management module 121-2 in accordance with someembodiments, FIG. 2A-2 is intended more as a functional description ofthe various features which may be present in management module 121-2than as a structural schematic of the embodiments described herein. Inpractice, and as recognized by those of ordinary skill in the art, theprograms, modules, and data structures shown separately could becombined and some programs, modules, and data structures could beseparated.

FIG. 2B-1 is a block diagram illustrating a system management module151-1, in accordance with some embodiments, e.g., embodiments in whichthe system management module is in a storage system controller, as shownin FIG. 1B. System management module 151-1 typically includes one ormore processing units (sometimes called CPUs or processors) 152-1 forexecuting modules, programs and/or instructions stored in memory 246-1and thereby performing processing operations, memory 246-1 (sometimescalled storage system controller memory or controller memory), and oneor more communication buses 248-1 for interconnecting these components.The one or more communication buses 248-1 optionally include circuitry(sometimes called a chipset) that interconnects and controlscommunications between system components. System management module 151-1is coupled to additional module(s) 155 by the one or more communicationbuses 248-1. Memory 246-1 includes high-speed random access memory, suchas DRAM, SRAM, DDR RAM or other random access solid state memorydevices, and may include non-volatile memory, such as one or moremagnetic disk storage devices, optical disk storage devices, flashmemory devices, or other non-volatile solid state storage devices.Memory 246-1 optionally includes one or more storage devices remotelylocated from the CPU(s) 152-1. Memory 246-1, or alternatively thenon-volatile memory device(s) within memory 246-1, comprises anon-transitory computer readable storage medium. In some embodiments,memory 246-1, or the non-transitory computer readable storage medium ofmemory 246-1 stores the following programs, modules, and datastructures, or a subset or superset thereof:

-   -   system mapping module 250-1 that is used for mapping virtual        logical addresses (e.g., used by computer system 142, FIG. 1B)        to intermediate addresses (e.g., which are mapped by storage        devices 160 to physical addresses, FIG. 1B);    -   metrics module 252-1 that is used for generating and/or        obtaining one or more metrics of a storage device (e.g., any of        storage devices 160-1 to 160-m, FIG. 1B);    -   trigger detection module 254-1 that is used for detecting a        trigger condition (e.g., in accordance with one or more metrics        of a storage device);    -   enabling module 256-1 that is used for enabling an amelioration        process associated with a trigger condition (e.g., detected by        trigger detection module 254-1);    -   notification module 258-1 that is used for notifying a host to        which a storage device is operatively coupled of a trigger        condition (e.g., detected by trigger detection module 254-1)        and/or of an absence of the trigger condition;    -   amelioration module 260-1 that is used for performing an        amelioration process to reduce declared capacity of non-volatile        memory of a storage device (e.g., storage device 160, FIG. 1B),        optionally including:        -   detection module 261-1 that is used for detecting an            amelioration trigger for reducing declared capacity of the            non-volatile memory of the storage device;        -   utilization module 262-1 that is used for reducing            utilization of the non-volatile memory of the storage            device; and        -   capacity module 264-1 that is used for reducing declared            capacity of the non-volatile memory of the storage device;            and    -   optionally, data redundancy module 266-1 that is used for        redundantly encoding data (e.g., to implement a particular RAID        (redundant array of independent disks) level); and    -   optionally, communication module 268-1 that is used for        facilitating communications with other devices, for example via        a storage area network (SAN).

Each of the above identified elements may be stored in one or more ofthe previously mentioned memory devices, and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures or modules, andthus various subsets of these modules may be combined or otherwisere-arranged in various embodiments. In some embodiments, memory 246-1may store a subset of the modules and data structures identified above.Furthermore, memory 246-1 may store additional modules and datastructures not described above. In some embodiments, the programs,modules, and data structures stored in memory 246-1, or thenon-transitory computer readable storage medium of memory 246-1, provideinstructions for implementing some of the methods described below. Insome embodiments, some or all of these modules may be implemented withspecialized hardware circuits that subsume part or all of the modulefunctionality.

Although FIG. 2B-1 shows system management module 151-1 in accordancewith some embodiments, FIG. 2B-1 is intended more as a functionaldescription of the various features which may be present in systemmanagement module 151-1 than as a structural schematic of theembodiments described herein. In practice, and as recognized by those ofordinary skill in the art, the programs, modules, and data structuresshown separately could be combined and some programs, modules, and datastructures could be separated.

FIG. 2B-2 is a block diagram illustrating a system management module151-2, in accordance with some embodiments, e.g., embodiments in whichthe system management module is located in the host, as shown in FIG.1B; in some such embodiments the storage system is called a host-managedstorage system. System management module 151-2 typically includes one ormore processing units (sometimes called CPUs or processors) 152-2 forexecuting modules, programs and/or instructions stored in memory 246-2and thereby performing processing operations, memory 246-2 (sometimescalled host memory), and one or more communication buses 248-2 forinterconnecting these components. The one or more communication buses248-2 optionally include circuitry (sometimes called a chipset) thatinterconnects and controls communications between system components.System management module 151-2 is coupled to storage system controller150 by the one or more communication buses 248-2. Memory 246-2 includeshigh-speed random access memory, such as DRAM, SRAM, DDR RAM or otherrandom access solid state memory devices, and may include non-volatilememory, such as one or more magnetic disk storage devices, optical diskstorage devices, flash memory devices, or other non-volatile solid statestorage devices. Memory 246-2 optionally includes one or more storagedevices remotely located from the CPU(s) 152-2. Memory 246-2, oralternatively the non-volatile memory device(s) within memory 246-2,comprises a non-transitory computer readable storage medium. In someembodiments, memory 246-2, or the non-transitory computer readablestorage medium of memory 246-2 stores the following programs, modules,and data structures, or a subset or superset thereof:

-   -   system mapping module 250-2 that is used for mapping virtual        logical addresses (e.g., used by computer system 142, FIG. 1B)        to intermediate addresses (e.g., which are mapped by storage        devices 160 to physical addresses, FIG. 1B);    -   metrics module 252-2 that is used for generating and/or        obtaining one or more metrics of a storage device (e.g., any of        storage devices 160-1 to 160-m, FIG. 1B);    -   trigger detection module 254-2 that is used for detecting a        trigger condition (e.g., in accordance with one or more metrics        of a storage device);    -   enabling module 256-2 that is used for enabling an amelioration        process associated with a trigger condition (e.g., detected by        trigger detection module 254-2);    -   notification module 258-2 that is used for notifying a host to        which a storage device is operatively coupled of a trigger        condition (e.g., detected by trigger detection module 254-2)        and/or of an absence of the trigger condition;    -   amelioration module 260-2 that is used for performing an        amelioration process to reduce declared capacity of non-volatile        memory of a storage device (e.g., storage device 160, FIG. 1B),        optionally including:        -   detection module 261-2 that is used for detecting an            amelioration trigger for reducing declared capacity of the            non-volatile memory of the storage device;        -   utilization module 262-2 that is used for reducing            utilization of the non-volatile memory of the storage            device; and        -   capacity module 264-2 that is used for reducing declared            capacity of the non-volatile memory of the storage device;    -   optionally, data redundancy module 266-2 that is used for        redundantly encoding data (e.g., to implement a particular RAID        (redundant array of independent disks) level); and    -   optionally, communication module 268-2 that is used for        facilitating communications with other devices, for example, via        a storage area network (SAN).

Each of the above identified elements may be stored in one or more ofthe previously mentioned memory devices, and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures or modules, andthus various subsets of these modules may be combined or otherwisere-arranged in various embodiments. In some embodiments, memory 246-2may store a subset of the modules and data structures identified above.Furthermore, memory 246-2 may store additional modules and datastructures not described above. In some embodiments, the programs,modules, and data structures stored in memory 246-2, or thenon-transitory computer readable storage medium of memory 246-2, provideinstructions for implementing some of the methods described below. Insome embodiments, some or all of these modules may be implemented withspecialized hardware circuits that subsume part or all of the modulefunctionality.

Although FIG. 2B-2 shows system management module 151-2 in accordancewith some embodiments, FIG. 2B-2 is intended more as a functionaldescription of the various features which may be present in systemmanagement module 151-2 than as a structural schematic of theembodiments described herein. In practice, and as recognized by those ofordinary skill in the art, the programs, modules, and data structuresshown separately could be combined and some programs, modules, and datastructures could be separated.

FIG. 2C-1 is a block diagram illustrating a cluster management module181-1, in accordance with some embodiments, as shown in FIG. 1C. Clustermanagement module 181-1 typically includes one or more processing units(sometimes called CPUs or processors) 182-1 for executing modules,programs and/or instructions stored in memory 276-1 and therebyperforming processing operations, memory 276-1, and one or morecommunication buses 278-1 for interconnecting these components. The oneor more communication buses 278-1 optionally include circuitry(sometimes called a chipset) that interconnects and controlscommunications between system components. Cluster management module181-1 is coupled to additional module(s) 185 by the one or morecommunication buses 278-1. Memory 276-1 includes high-speed randomaccess memory, such as DRAM, SRAM, DDR RAM or other random access solidstate memory devices, and may include non-volatile memory, such as oneor more magnetic disk storage devices, optical disk storage devices,flash memory devices, or other non-volatile solid state storage devices.Memory 276-1 optionally includes one or more storage devices remotelylocated from the CPU(s) 182-1. Memory 276-1, or alternatively thenon-volatile memory device(s) within memory 276-1, comprises anon-transitory computer readable storage medium. In some embodiments,memory 276-1, or the non-transitory computer readable storage medium ofmemory 276-1 stores the following programs, modules, and datastructures, or a subset or superset thereof:

-   -   cluster mapping module 280-1 that is used for mapping virtual        logical addresses (e.g., used by computer system 172, FIG. 1C)        to intermediate addresses (e.g., which are mapped by storage        subsystems 192 to physical addresses, FIG. 1C);    -   metrics module 282-1 that is used for generating and/or        obtaining one or more metrics of a storage device (e.g., any of        the storage devices 194-1 to 194-n or 194-j to 194-k, FIG. 1C);    -   trigger detection module 284-1 that is used for detecting a        trigger condition (e.g., in accordance with one or more metrics        of a storage device);    -   enabling module 286-1 that is used for enabling an amelioration        process associated with a trigger condition (e.g., detected by        trigger detection module 284-1);    -   notification module 288-1 that is used for notifying a host to        which a storage device is operatively coupled of a trigger        condition (e.g., detected by trigger detection module 284-1)        and/or of an absence of the trigger condition;    -   amelioration module 290-1 that is used for performing an        amelioration process to reduce declared capacity of non-volatile        memory of a storage device (e.g., storage device 194, FIG. 1C),        optionally including:        -   detection module 291-1 that is used for detecting an            amelioration trigger for reducing declared capacity of the            non-volatile memory of the storage device;        -   utilization module 292-1 that is used for reducing            utilization of the non-volatile memory of the storage            device; and        -   capacity module 294-1 that is used for reducing declared            capacity of the non-volatile memory of the storage device;    -   optionally, data redundancy module 296-1 that is used for        redundantly encoding data; and    -   optionally, communication module 298-1 that is used for        facilitating communications with other devices, for example, via        a storage area network (SAN).

Each of the above identified elements may be stored in one or more ofthe previously mentioned memory devices, and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures or modules, andthus various subsets of these modules may be combined or otherwisere-arranged in various embodiments. In some embodiments, memory 276-1may store a subset of the modules and data structures identified above.Furthermore, memory 276-1 may store additional modules and datastructures not described above. In some embodiments, the programs,modules, and data structures stored in memory 276-1, or thenon-transitory computer readable storage medium of memory 276-1, provideinstructions for implementing some of the methods described below. Insome embodiments, some or all of these modules may be implemented withspecialized hardware circuits that subsume part or all of the modulefunctionality.

Although FIG. 2C-1 shows cluster management module 181-1 in accordancewith some embodiments, FIG. 2C-1 is intended more as a functionaldescription of the various features which may be present in clustermanagement module 181-1 than as a structural schematic of theembodiments described herein. In practice, and as recognized by those ofordinary skill in the art, the programs, modules, and data structuresshown separately could be combined and some programs, modules, and datastructures could be separated.

FIG. 2C-2 is a block diagram illustrating a cluster management module181-2, in accordance with some embodiments, e.g., embodiments in whichthe cluster management module is located, at least in part, in the host,as shown in FIG. 1C; in some such embodiments the storage system useshost-based cluster management. Cluster management module 181-2 typicallyincludes one or more processing units (sometimes called CPUs orprocessors) 182-2 for executing modules, programs and/or instructionsstored in memory 276-2 and thereby performing processing operations,memory 276-2 (sometimes called host memory), and one or morecommunication buses 278-2 for interconnecting these components. The oneor more communication buses 278-2 optionally include circuitry(sometimes called a chipset) that interconnects and controlscommunications between system components. Cluster management module181-2 is coupled to cluster controller 180 by the one or morecommunication buses 278-2. Memory 276-2 includes high-speed randomaccess memory, such as DRAM, SRAM, DDR RAM or other random access solidstate memory devices, and may include non-volatile memory, such as oneor more magnetic disk storage devices, optical disk storage devices,flash memory devices, or other non-volatile solid state storage devices.Memory 276-2 optionally includes one or more storage devices remotelylocated from the CPU(s) 182-2. Memory 276-2, or alternatively thenon-volatile memory device(s) within memory 276-2, comprises anon-transitory computer readable storage medium. In some embodiments,memory 276-2, or the non-transitory computer readable storage medium ofmemory 276-2 stores the following programs, modules, and datastructures, or a subset or superset thereof:

-   -   cluster mapping module 280-2 that is used for mapping virtual        logical addresses (e.g., used by computer system 172, FIG. 1C)        to intermediate addresses (e.g., which are mapped by storage        subsystems 192 to physical addresses, FIG. 1C);    -   metrics module 282-2 that is used for generating and/or        obtaining one or more metrics of a storage device (e.g., any of        the storage devices 194-1 to 194-n or 194-j to 194-k, FIG. 1C);    -   trigger detection module 284-2 that is used for detecting a        trigger condition (e.g., in accordance with one or more metrics        of a storage device);    -   enabling module 286-2 that is used for enabling an amelioration        process associated with a trigger condition (e.g., detected by        trigger detection module 284-2);    -   notification module 288-2 that is used for notifying a host to        which a storage device is operatively coupled of a trigger        condition (e.g., detected by trigger detection module 284-2)        and/or of an absence of the trigger condition;    -   amelioration module 290-2 that is used for performing an        amelioration process to reduce declared capacity of non-volatile        memory of a storage device (e.g., storage device 194, FIG. 1C),        optionally including:        -   detection module 291-2 that is used for detecting an            amelioration trigger for reducing declared capacity of the            non-volatile memory of the storage device;        -   utilization module 292-2 that is used for reducing            utilization of the non-volatile memory of the storage            device; and        -   capacity module 294-2 that is used for reducing declared            capacity of the non-volatile memory of the storage device;    -   optionally, data redundancy module 296-2 that is used for        redundantly encoding data; and    -   optionally, communication module 298-2 that is used for        facilitating communications with other devices, for example, via        a storage area network (SAN).

Each of the above identified elements may be stored in one or more ofthe previously mentioned memory devices, and corresponds to a set ofinstructions for performing a function described above. The aboveidentified modules or programs (i.e., sets of instructions) need not beimplemented as separate software programs, procedures or modules, andthus various subsets of these modules may be combined or otherwisere-arranged in various embodiments. In some embodiments, memory 276-2may store a subset of the modules and data structures identified above.Furthermore, memory 276-2 may store additional modules and datastructures not described above. In some embodiments, the programs,modules, and data structures stored in memory 276-2, or thenon-transitory computer readable storage medium of memory 276-2, provideinstructions for implementing some of the methods described below. Insome embodiments, some or all of these modules may be implemented withspecialized hardware circuits that subsume part or all of the modulefunctionality.

Although FIG. 2C-2 shows cluster management module 181-2 in accordancewith some embodiments, FIG. 2C-2 is intended more as a functionaldescription of the various features which may be present in clustermanagement module 181-2 than as a structural schematic of theembodiments described herein. In practice, and as recognized by those ofordinary skill in the art, the programs, modules, and data structuresshown separately could be combined and some programs, modules, and datastructures could be separated.

FIG. 2D is a block diagram illustrating amelioration module 230 includedin management module 121-1 of FIG. 2A-1 and/or management module 121-2of FIG. 2A-2, in accordance with some embodiments. As described abovewith respect to FIGS. 2A-1 and 2A-2, in some embodiments, ameliorationmodule 230 includes utilization module 232 and capacity module 234. Insome embodiments, utilization module 232 includes the following programsand/or modules, or a subset or superset thereof:

-   -   trimming module 235 that is used for trimming from a storage        device at least a portion of previously-written data that is no        longer used by a host (e.g., not live data 332, FIG. 3);    -   deleting module 236 that is used for deleting from a storage        device discardable data that is used by a host; and    -   moving module 237 that is used for moving a portion of data that        is used by a host from a storage device to another storage        device.

In some embodiments, capacity module 234 includes the following programsand/or modules, or a subset or superset thereof:

-   -   LBA reduction module 238 (sometimes called a logical address        reduction module) that is used for reducing a range of logical        addresses, reducing a count of logical addresses, and/or making        specific logical addresses unavailable to a host; and    -   advertising module 239 that is used for advertising a reduced        declared capacity of non-volatile memory of a storage device or        storage subsystem.

In some embodiments, the amelioration process includes a utilizationreduction process (e.g., performed by utilization module 232) and adeclared capacity reduction process (e.g., performed by capacity module234). In some embodiments, the amelioration process has a target reduceddeclared capacity to be achieved by the amelioration process, andutilizes the target reduced declared capacity to determine a targetamount of utilization reduction to be achieved by the ameliorationprocess. In some circumstances, such as when the amelioration processhas a target reduced declared capacity to be achieved by theamelioration process, and the amount of a storage device utilized isless than the target reduced declared capacity, the target amount ofutilization reduction is zero. In such circumstances, performance of theutilization reduction process, or one or more portions of theutilization reduction process, is unneeded and therefore skipped orforgone. Furthermore, in some embodiments, the amelioration process(e.g., periodically, semi-continuously, irregularly, initially and/orfinally) recomputes or re-evaluates a number of parameters, such as thetarget reduced declared capacity and/or the target amount of utilizationreduction, as those parameters may change in value due to theamelioration process and/or normal storage operations (e.g., read,write, erase and trim or unmap operations). In some circumstances, inaccordance with the recomputed or re-evaluated parameters, theutilization reduction is re-prioritized, re-scheduled, or aborted.Although FIG. 2D uses the example of amelioration module 230 included inFIGS. 2A-1 and 2A-2, the description of FIG. 2D similarly applies toother amelioration modules (e.g., amelioration module 260-1 of FIG.2B-1, amelioration module 260-2 of FIG. 2B-2, amelioration module 290-1of FIG. 2C-1, and/or amelioration module 290-2 of FIG. 2C-2), and forsake of brevity, the details are not repeated here.

The trim operation indicates that specific portions of the LBA space(320, FIG. 3) are converted to unallocated LBA space (340), therebyreducing utilization. The trim operation typically includes invalidatingone or more entries of a mapping table (e.g., mapping table 402, FIG. 4)used to translate logical addresses in a logical address space tophysical addresses in a physical address space of a storage device. As aresult of the trim operation, any data that was previously stored usingthe specific portion of the LBA space is no longer available to the host(e.g., is discarded). The physical pages used to previously store thisdata may be reused for other purposes. The reuse may be done coincidentin time with the trim operation or at a future time (e.g., duringgarbage collection). As discussed elsewhere, the reused physical pagesmay be used with a different encoding format or different redundancymechanism than the encoding format or different redundancy mechanismused by those same physical pages before the reuse. The trim operationis sometimes also referred to as an unmap operation. The trim operation,as used herein, is not necessarily identical to the trim operation ofthe SATA protocol. The unmap operation, as used herein, is notnecessarily identical to the unmap operation of the SCSI protocol.

FIG. 3 is a block diagram of a logical block address (LBA) space 320(sometimes called logical address (LA) space), in accordance with someembodiments. In some embodiments, a logical address is the address atwhich an item (e.g., a file or other data) resides from the perspectiveof a host (e.g., computer system 110, FIG. 1A, computer system 142, FIG.1B, and/or computer system 172, FIG. 1C). In some embodiments, a logicaladdress (e.g., in LBA space 320) differs from a physical address (e.g.,in physical space 318) due to the operation of a mapping function oraddress translator (e.g., a function or module that includes translationtable 212-1, FIG. 2A-1, or mapping table 402, FIG. 4). In someembodiments, a logical block address (LBA) is mapped to a physical flashaddress (e.g., a physical page number (PPN), including a bank, block,and page), as described further with respect to FIG. 4.

In some embodiments, a logical address space includes allocated logicaladdress space (e.g., allocated LBA space 342) and unallocated logicaladdress space (e.g., unallocated LBA space 340). In some embodiments,unallocated logical address space is logical address space at which nodata is stored. In some embodiments, unallocated logical address spaceincludes logical address space that has never been written to and/or hasbeen discarded (previously written data may be discarded through a trimor unmap operation, and is sometimes called trimmed logical addressspace). For example, in FIG. 3, unallocated LBA space 340 includestrimmed LBA space 330. In some embodiments, allocated logical addressspace is logical address space that was previously-written by a host,the previously-written data including data that is no longer used by ahost (e.g., not live data 332) and data that is still in use by the host(e.g., live data 334). In some embodiments, not live data is data in aportion of the logical address space that is marked as free, availableor unused in the metadata of a file system. Optionally, a file systemmay choose to convert not live address space into unallocated addressspace through a trim or unmap operation.

In FIG. 3, allocated LBA space 342 represents an amount of allocatedspace, and unallocated LBA space 340 represents an amount of unallocatedspace. However, neither allocated LBA space 342 nor unallocated LBAspace 340 is necessarily a single contiguous region of LBA space 320.Similarly, live data 334 and not live data 332 in FIG. 3 representamounts (e.g., counts of LBAs) of live data and not live data,respectively. However, neither live data 334 nor not live data 332 isnecessarily a single contiguous region of LBA space 320 or allocated LBAspace 342, nor do the positions of live data 334 and not live data 332illustrated in FIG. 3 have any correlation to the logical or physicaladdress values of the live data and not live data. Typically, live data334 and/or not live data 332 will be present in multiple regions of LBAspace 320, and are thus non-contiguous. Optionally, however, a remappingor coalescing process, which can also be called defragmentation, can beperformed to consolidate some or all live data 334 into a contiguousregion of LBA space 320.

Allocated logical address space (342) is space that is utilized. Theutilization reduction modules and processes discussed herein aremodules, applications and processes whose purpose is to reduce the sizeof the allocated logical address space, and thus reduce utilization ofnon-volatile memory in a storage device or data storage system.Typically, reducing the size of the allocated logical address spacerequires reducing the amount of live data 334 and/or not live data 332stored by a storage device, or storage system, thereby converting aportion of the allocated logical address space into unallocated logicaladdress space. In some embodiments, portions of not live data 332 aretrimmed, and thereby converted into unallocated logical address spacethrough the use of trim or unmap operations.

In some embodiments, a logical address may be outside of LBA Space (320)and is therefore unavailable. A previously available logical address canbe made unavailable by reducing the size of the LBA space (320) suchthat that address is no longer within LBA space (320) and hence becomesunavailable (e.g. it is an undefined operation or erroneous operation torequest a normal storage operation to a logical address that is outsideof LBA space (320)). As noted above, LBA Space (320) can be reduced by acommand to the storage device, or a host can limit its usage of logicaladdresses to a reduced range of logical addresses therefore effectivelyreducing LBA space (320).

In some embodiments, the total number of allocated logical addresses(342) is limited. In such embodiments, specific logical addresses areconsidered to be unavailable if usage of them would cause the system toexceed the limited total number. For example, if the total number ofallocated logical addresses is limited to five and the currentlyallocated addresses are 1, 3, 19, 45 and 273838 then any specificlogical address other than these five (e.g., 6, 15, 137, etc.) would beconsidered unavailable.

FIG. 4 is a block diagram of a mapping table 402 and physical addressspace 410, in accordance with some embodiments. In some embodiments,mapping table 402 is used to translate a logical block address (LBA)from the perspective of a host (e.g., computer system 110, FIG. 1A) to aphysical address in a physical address space (e.g., physical addressspace 410) of non-volatile memory in a storage device (e.g., storagedevice 120, FIG. 1A). In some embodiments, an LBA is the address of thesmallest unit of stored data that is addressable by a host (e.g., 512 Bor 4096 B). In some embodiments, LBAs are a sequence of integersorganized in numerical order in the logical address space. In someembodiments, LBAs are integers chosen from a logical address space butneed not be contiguous. For example, in implementations that utilize asparse logical address space, the amount of addressable space isgoverned by a limit on the number of logical addresses that can beallocated, but those logical addresses are distributed over a largeraddress space than the maximum number of logical addresses that can beallocated (e.g., to a host or a set of hosts or clients).

In some embodiments, mapping table 402 is stored in memory associatedwith the storage device (e.g., in memory 206-1, as part of translationtable 212-1, FIG. 2A-1). In some embodiments, a physical address is aphysical page number (PPN), including a bank number, a block number, anda page number. In the example shown in FIG. 4, LBA 0 is mapped to bank 1(e.g., Bank 420-1), block 3 (e.g., Block 421-3), page 37 (pages notshown in FIG. 4) of physical address space 410. FIG. 4 shows thatphysical address space 410 includes a plurality of non-volatile memoryblocks 421, 422 423, 424. As described above, and as shown in therepresentation of block 424-p, each non-volatile memory block in thephysical address space of a storage device typically includes aplurality of pages 426, where each page is typically an instance of thesmallest individually accessible (e.g., readable or writable) portion ofa block. Although FIG. 4 illustrates one example of a logical address tophysical address mapping, in other embodiments, different mappings maybe used. For example, in some embodiments, each of the logical addressentries corresponds to multiple (e.g., eight) logical addresses (e.g., 8LBAs per logical address entry). In some embodiments mapping table 402need not contain contiguous LBA addresses and may be organized in anymanner to facilitate lookup operations, e.g., hash table, binary tree,content addressable memory, and others.

As discussed below with reference to FIG. 5A, a single-level flashmemory cell (SLC) stores one bit (“0” or “1”). Thus, the storage densityof a SLC memory device is one bit of information per memory cell. Amulti-level flash memory cell (MLC), however, can store two or more bitsof information per cell by using different ranges within the totalvoltage range of the memory cell to represent a multi-bit bit-tuple. Inturn, the storage density of a MLC memory device is multiple-bits percell (e.g., two bits per memory cell).

Flash memory devices utilize memory cells to store data as electricalvalues, such as electrical charges or voltages. Each flash memory celltypically includes a single transistor with a floating gate that is usedto store a charge, which modifies the threshold voltage of thetransistor (i.e., the voltage needed to turn the transistor on). Themagnitude of the charge, and the corresponding threshold voltage, isused to represent one or more data values. In some embodiments, during aread operation, a reading threshold voltage is applied to the controlgate of the transistor and the resulting sensed current or voltage ismapped to a data value.

The terms “cell voltage” and “memory cell voltage,” in the context offlash memory cells, typically means the threshold voltage of the memorycell, which is the minimum voltage that needs to be applied to the gateof the memory cell's transistor in order for the transistor to conductcurrent. Similarly, reading threshold voltages (sometimes also calledreading signals, reading voltages, and/or read thresholds) applied to aflash memory cells are gate voltages applied to the gates of the flashmemory cells to determine whether the memory cells conduct current atthat gate voltage. In some embodiments, when a flash memory cell'stransistor conducts current at a given reading threshold voltage,indicating that the cell voltage is less than the reading thresholdvoltage, the raw data value for that read operation is a “1,” andotherwise the raw data value is a “0.”

FIG. 5A is a simplified, prophetic diagram of voltage distributions 300a found in a single-level flash memory cell (SLC) over time, inaccordance with some embodiments. The voltage distributions 300 a shownin FIG. 5A have been simplified for illustrative purposes. In thisexample, the SLC's voltage range extends approximately from a voltage,V_(SS), at a source terminal of an NMOS transistor to a voltage, V_(DD),at a drain terminal of the NMOS transistor. As such, voltagedistributions 300 a extend between V_(SS) and V_(DD).

Sequential voltage ranges 301 and 302 between source voltage V_(SS) anddrain voltage V_(DD) are used to represent corresponding bit values “1”and “0,” respectively. Each voltage range 301, 302 has a respectivecenter voltage V₁ 301 b, V₀ 302 b. As described below, in manycircumstances the memory cell current sensed in response to an appliedreading threshold voltages is indicative of a memory cell voltagedifferent from the respective center voltage V₁ 301 b or V₀ 302 bcorresponding to the respective bit value written into the memory cell.Errors in cell voltage, and/or the cell voltage sensed when reading thememory cell, can occur during write operations, read operations, or dueto “drift” of the cell voltage between the time data is written to thememory cell and the time a read operation is performed to read the datastored in the memory cell. For ease of discussion, these effects arecollectively described as “cell voltage drift.” Each voltage range 301,302 also has a respective voltage distribution 301 a, 302 a that mayoccur as a result of any number of a combination of error-inducingfactors, examples of which are identified above.

In some implementations, a reading threshold voltage V_(R) is appliedbetween adjacent center voltages (e.g., applied proximate to the halfwayregion between adjacent center voltages V₁ 301 b and V₀ 302 b).Optionally, in some implementations, the reading threshold voltage islocated between voltage ranges 301 and 302. In some implementations,reading threshold voltage V_(R) is applied in the region proximate towhere the voltage distributions 301 a and 302 a overlap, which is notnecessarily proximate to the halfway region between adjacent centervoltages V₁ 301 b and V₀ 302 b.

In order to increase storage density in flash memory, flash memory hasdeveloped from single-level (SLC) cell flash memory to multi-level cell(MLC) flash memory so that two or more bits can be stored by each memorycell. As discussed below with reference to FIG. 5B, a MLC flash memorydevice is used to store multiple bits by using voltage ranges within thetotal voltage range of the memory cell to represent differentbit-tuples. A MLC flash memory device is typically more error-prone thana SLC flash memory device created using the same manufacturing processbecause the effective voltage difference between the voltages used tostore different data values is smaller for a MLC flash memory device.Moreover, due to any number of a combination of factors, such aselectrical fluctuations, defects in the storage medium, operatingconditions, device history, and/or write-read circuitry, a typical errorincludes a stored voltage level in a particular MLC being in a voltagerange that is adjacent to the voltage range that would otherwise berepresentative of the correct storage of a particular bit-tuple. Asdiscussed in greater detail below with reference to FIG. 5B, the impactof such errors can be reduced by gray-coding the data, such thatadjacent voltage ranges represent single-bit changes between bit-tuples.

FIG. 5B is a simplified, prophetic diagram of voltage distributions 300b found in a multi-level flash memory cell (MLC) over time, inaccordance with some embodiments. The voltage distributions 300 b shownin FIG. 5B have been simplified for illustrative purposes. The cellvoltage of a MLC approximately extends from a voltage, V_(SS), at thesource terminal of a NMOS transistor to a voltage, V_(DD), at the drainterminal. As such, voltage distributions 300 b extend between V_(SS) andV_(DD).

Sequential voltage ranges 311, 312, 313, 314 between the source voltageV_(SS) and drain voltages V_(DD) are used to represent correspondingbit-tuples “11,” “01,” “00,” “10,” respectively. Each voltage range 311,312, 313, 314 has a respective center voltage 311 b, 312 b, 313 b, 314b. Each voltage range 311, 312, 313, 314 also has a respective voltagedistribution 311 a, 312 a, 313 a, 314 a that may occur as a result ofany number of a combination of factors, such as electrical fluctuations,defects in the storage medium, operating conditions, device history(e.g., number of program-erase (P/E) cycles), and/or imperfectperformance or design of write-read circuitry.

Ideally, during a write operation, the charge on the floating gate ofthe MLC would be set such that the resultant cell voltage is at thecenter of one of the ranges 311, 312, 313, 314 in order to write thecorresponding bit-tuple to the MLC. Specifically, the resultant cellvoltage would be set to one of V₁₁ 311 b, V₀₁ 312 b, V₀₀ 313 b and V₁₀314 b in order to write a corresponding one of the bit-tuples “11,”“01,” “00” and “10.” In reality, due to the factors mentioned above, theinitial cell voltage may differ from the center voltage for the datawritten to the MLC.

Reading threshold voltages V_(RA), V_(RB) and V_(RC) are positionedbetween adjacent center voltages (e.g., positioned at or near thehalfway point between adjacent center voltages) and, thus, definethreshold voltages between the voltage ranges 311, 312, 313, 314. Duringa read operation, one of the reading threshold voltages V_(RA), V_(RB)and V_(RC) is applied to determine the cell voltage using a comparisonprocess. However, due to the various factors discussed above, the actualcell voltage, and/or the cell voltage received when reading the MLC, maybe different from the respective center voltage V₁₁ 311 b, V₀₁ 312 b,V₀₀ 313 b or V₁₀ 314 b corresponding to the data value written into thecell. For example, the actual cell voltage may be in an altogetherdifferent voltage range, strongly indicating that the MLC is storing adifferent bit-tuple than was written to the MLC. More commonly, theactual cell voltage may be close to one of the read comparison voltages,making it difficult to determine with certainty which of two adjacentbit-tuples is stored by the MLC.

Errors in cell voltage, and/or the cell voltage received when readingthe MLC, can occur during write operations, read operations, or due to“drift” of the cell voltage between the time data is written to the MLCand the time a read operation is performed to read the data stored inthe MLC. For ease of discussion, sometimes errors in cell voltage,and/or the cell voltage received when reading the MLC, are collectivelycalled “cell voltage drift.”

One way to reduce the impact of a cell voltage drifting from one voltagerange to an adjacent voltage range is to gray-code the bit-tuples.Gray-coding the bit-tuples includes constraining the assignment ofbit-tuples such that a respective bit-tuple of a particular voltagerange is different from a respective bit-tuple of an adjacent voltagerange by only one bit. For example, as shown in FIG. 5B, thecorresponding bit-tuples for adjacent ranges 301 and 302 arerespectively “11” and “01,” the corresponding bit-tuples for adjacentranges 302 and 303 are respectively “01” and “00,” and the correspondingbit-tuples for adjacent ranges 303 and 304 are respectively “00” and“10.” Using gray-coding, if the cell voltage drifts close to a readcomparison voltage level, the error is typically limited to a single bitwithin the 2-bit bit-tuple.

Although the description of FIG. 5B uses an example in which q=2 (i.e.,2 bits per cell in a MLC flash memory), those skilled in the art willappreciate that the embodiments described herein may be extended tomemory cells that have more than four possible states per cell, yieldingmore than two bits of information per cell. For example, in someembodiments, a triple-level memory cell (TLC) has eight possible statesper cell, yielding three bits of information per cell. As anotherexample, in some embodiments, a quad-level memory cell (QLC) has 16possible states per cell, yielding four bits of information per cell. Asanother example, in some embodiments, a cell might store only 6 states,yielding approximately 2.5 bits of information per cell, meaning thattwo cells together would provide 36 possible states, more thansufficient to store 5 bits of information per pair of cells.

FIG. 6 illustrates a flowchart representation of a method 600 ofmanaging a storage system, in accordance with some embodiments. At leastin some embodiments, method 600 is performed by a storage device (e.g.,storage device 120, FIG. 1A) or one or more components of the storagedevice (e.g., storage controller 124 and/or storage medium 130, FIG.1A), wherein the storage device is operatively coupled with a hostsystem (e.g., computer system 110, FIG. 1A). In some embodiments, method600 is governed by instructions that are stored in a non-transitorycomputer readable storage medium and that are executed by one or moreprocessors of a device, such as the one or more processing units (CPUs)122-1 of management module 121-1, shown in FIGS. 1A and 2A-1. In someembodiments, method 600 is performed by a storage system (e.g., datastorage system 100, FIG. 1A, data storage system 140, FIG. 1B, and/ordata storage system 170, FIG. 1C) or one or more components of thestorage system (e.g., computer system 110 and/or storage device 120,FIG. 1A, storage system controller 150, FIG. 1B, and/or clustercontroller 180, FIG. 1C). In some embodiments, some of the operations ofmethod 600 are performed at a host (e.g., computer system 110, FIG. 1A,computer system 142, FIG. 1B, and/or computer system 172, FIG. 1C) andinformation is transmitted to a storage device (e.g., storage device120, FIG. 1A) and/or one or more subsystems of a storage system (e.g.,storage system controller 150, FIG. 1B, and/or cluster controller 180,FIG. 1C). In some embodiments, method 600 is governed, at least in part,by instructions that are stored in a non-transitory computer readablestorage medium and that are executed by one or more processors of asubsystem of a storage system, such as the one or more processing units(CPUs) 152-1 of system management module 151-1, shown in FIGS. 1B and2B-1 or the one or more processing units (CPUs) 182-1 of clustermanagement module 181-1, shown in FIGS. 1C and 2C-1. In someembodiments, method 600 is governed, at least in part, by instructionsthat are stored in a non-transitory computer readable storage medium andthat are executed by one or more processors of a host (processors ofhost not shown in FIGS. 1A, 1B, and 1C). For ease of explanation, thefollowing describes method 600 as performed by a storage device (e.g.,storage device 120, FIG. 1A). However, those skilled in the art willappreciate that in other embodiments, one or more of the operationsdescribed in method 600 are performed by a host (e.g., computer system110, FIG. 1A, computer system 142, FIG. 1B, and/or computer system 172,FIG. 1C) and/or one or more subsystems of a storage system distinct fromthe storage device (e.g., storage system controller 150, FIG. 1B, and/orcluster controller 180, FIG. 1C).

A storage device (e.g., storage device 120, FIG. 1A), triggers (602) acondition for reducing declared capacity of non-volatile memory of thestorage device in accordance with one or more metrics of the storagedevice (e.g., including one or more status metrics corresponding to thestorage device's ability to retain data, one or more performance metricscorresponding to performance of the storage device, one or more wearmetrics corresponding to wear on the storage device, and/or one or moretime metrics). Metrics of the storage device include metrics (e.g., wearmetrics such as P/E cycle counts, write operation counts and the like)of the non-volatile storage media (e.g., storage medium 130, FIG. 1A) ofthe storage device, but are not necessarily limited to such metrics. Forexample, some metrics (e.g., some performance metrics, such as latencymetrics, metrics that measure how long it takes or how many operationsare required to complete a write or erase operation, etc.) of thestorage device reflect both storage media performance as well ascontroller and/or other storage device component performance.

In some embodiments, the metrics of the storage device used to determinethe trigger condition include a write amplification metric of thestorage device. Another metric of the storage device that is used, insome embodiments, to determine the trigger condition is anover-provisioning metric (e.g., quantity or percentage of total storagecapacity that is in excess of the declared capacity of the storagedevice, and/or quantity or percentage of total storage capacity that isin excess of the declared capacity of the storage device after aprojected conversion of a number of memory blocks (or other portions ofthe storage device) from a current encoding format (e.g., TLC, MLCand/or data redundancy mechanism) to a lower storage density encodingformat (e.g., MLC, SLC and/or data redundancy mechanism). For example,in some embodiments, a trigger condition is determined if a projectedover-provisioning metric, corresponding to a number of blocks (or otherportions) of the storage device removed from service (e.g., that havebeen or will be removed from service) due to wear or due to failure ofthose blocks (or other portions) to meet a predefined quality of servicemetric, falls below a predefined threshold (e.g., a non-zero thresholdsuch as 2 percent or 5 percent or the like), or falls below a thresholddetermined in accordance with a measured or projected writeamplification of the storage device.

Write amplification is a phenomenon where the actual amount of physicaldata written to a storage medium (e.g., storage medium 130 in storagedevice 120) is a multiple of the logical amount of data written by ahost (e.g., computer system 110, sometimes called a host) to the storagemedium. As discussed above, when a block of storage medium must beerased before it can be re-written, the garbage collection process toperform these operations results in re-writing data one or more times.This multiplying effect increases the number of writes required over thelife of a storage medium, which shortens the time it can reliablyoperate. The formula to calculate the write amplification of a storagesystem is given by equation:

$\frac{{amount}\mspace{14mu}{of}\mspace{14mu}{data}\mspace{14mu}{written}\mspace{14mu}{to}\mspace{14mu} a\mspace{14mu}{storage}\mspace{14mu}{medium}}{{amount}\mspace{14mu}{of}\mspace{14mu}{data}\mspace{14mu}{written}\mspace{14mu}{by}\mspace{14mu} a\mspace{14mu}{host}}$

One of the goals of any flash memory based data storage systemarchitecture is to reduce write amplification as much as possible sothat available endurance is used to meet storage medium reliability andwarranty specifications. Higher system endurance also results in lowercost as the storage system may need less over-provisioning. By reducingwrite amplification, the endurance of the storage medium is increasedand the overall cost of the storage system is decreased. Generally,garbage collection is performed on erase blocks with the fewest numberof valid pages for best performance and best write amplification.

In some embodiments, the trigger condition is detected in accordancewith a non-linear and/or linear combination of the one or more metrics.For example, in some embodiments, the trigger condition is detected bycomparing a wear metric such as P/E cycle counts to a previouslydetermined value, e.g., a threshold value. In some embodiments, thetrigger condition can also be asserted by other means, e.g., by a humanoperator or scheduled by a human operator. For example, it may bedesirable to initiate the amelioration process because of the expectedavailability or unavailability of resources. For example, it may bedesirable to initiate the amelioration process because performancecharacteristics of the storage device (including reliability) arealtered.

In some embodiments, the trigger condition is detected in accordancewith historical knowledge of the one or more metrics. For example,historical knowledge can be a running average of one or more metrics. Inanother example, historical knowledge can be used to determine (e.g.,compute) one or more projected values of one or more metrics at aparticular time in the future (e.g., an hour, day, week, or month in thefuture), and the trigger condition can be detected in accordance withthe one or more projected values. The latter methodology can beparticularly useful for avoiding events that result in loss of data(e.g., due to wear out), or more generally for avoiding events thatsignificantly impact on the quality of service provided by a storagesystem, and for enabling a storage system to undertake ameliorativemeasures prior to there being an urgent need to do so. For example, insome embodiments, the trigger condition is detected by comparing ahistorical wear metric such as P/E cycle counts to a previouslydetermined value to anticipate wear out of a portion of the storagemedia. Similarly, in some embodiments, the trigger condition is detectedby comparing a historical metric, such as the bit error rate (BER), orthe rate of change of the metric, BER (of the storage media, or aportion of the storage media), or a projected value (e.g., a projectedBER rate at a particular time in the future, as determined based on acurrent or historical BER and a rate of change of the BER), against apreviously determined value to anticipate performance degradation due toincreased computation requirements of error correction.

In a storage system with a plurality of storage devices the triggercondition may be dependent on metrics obtained from a plurality of thestorage devices. The amelioration process may operate on more than onestorage device at a time, either sequentially or in parallel. Forexample, a storage system may have a fixed maximum rate of capacityreduction independent of how many storage devices are currently beingoperated on in parallel by the amelioration process (e.g., maximum rateof data movement between the storage devices while reducingutilization). The trigger condition should include considering,separately and in combination, the metrics of the plurality of storagedevices when determining the targeted capacity reduction and, due to thefixed maximum rate, the scheduling of the amelioration process.

The storage device notifies (604) a host (e.g., computer system 110,FIG. 1A, computer system 142, FIG. 1B, computer system 172, FIG. 1C,storage system controller 150, FIG. 1B, and/or cluster controller 180,FIG. 1C) to which the storage device is operatively coupled of thetrigger condition for reducing declared capacity of the non-volatilememory of the storage device. In some embodiments, upon receipt of thenotification of the trigger condition the host sends an ameliorationtrigger to initiate the amelioration process (606).

The storage device or a host detects the amelioration trigger and, inaccordance with the detected amelioration trigger, performs anamelioration process (606) to reduce declared capacity of thenon-volatile memory of the storage device. In some embodiments, theamelioration process includes a process to reduce utilization (608), aprocess to reduce declared capacity (610), and/or a process to advertise(612) a reduced declared capacity. As described above with respect toFIG. 2D, in some embodiments, the amelioration process (606) includes autilization reduction process (608) (e.g., performed by utilizationmodule 232, FIGS. 2A-1 and 2A-2, utilization module 262, FIGS. 2B-1 and2B-2, or utilization module 292, FIGS. 2C-1 and 2C-2) and/or a declaredcapacity reduction process (610) (e.g., performed by capacity module234, FIGS. 2A-1 and 2A-2, capacity module 264, FIGS. 2B-1 and 2B-2, orcapacity module 294, FIGS. 2C-1 and 2C-2). In some circumstances, suchas when the amount of the storage device utilized by the host is lessthan the reduced declared capacity, performance of the process to reduceutilization (608), or one or more portions of the process to reduceutilization, is skipped or forgone. Although FIG. 6 shows operations608, 610, and 612 as sequential processes of the amelioration process(606), in some embodiments, these processes may be overlapped,non-sequential, and/or performed in a different order.

In some embodiments, prior to the operations described above in FIG. 6(e.g., operations 602, 604, and/or 606), method 600 includes reducing(601) over-provisioning of the non-volatile memory of the storagedevice. As described above, over-provisioning refers to a quantity orpercentage of total storage capacity that is in excess of the declaredcapacity of the storage device. In some embodiments, over-provisioningrefers to the difference between the physical capacity of the storagedevice (e.g., the physical capacity less capacity set aside formanagement data structures and metadata) for storing user data (e.g.,data stored in the storage system on behalf of a host or host system),and the logical capacity presented as available for a host or user. Forexample, in some embodiments, if a non-volatile memory of a storagedevice has 12 GB of total storage capacity (e.g., total storage capacityfor storing user data) and 10 GB of declared capacity, then thenon-volatile memory of the storage device has 2 GB of over-provisioning.Unlike declared capacity, which is the storage capacity available to ahost, the extra capacity of over-provisioning is not visible to the hostas available storage. Instead, over-provisioning is used to increaseendurance of a storage device (e.g., by distributing the total number ofwrites and erases across a larger population of blocks and/or pages overtime), improve performance (e.g., by providing additional buffer spacefor managing P/E cycles and improving the probability that a writeoperation will have immediate access to a pre-erased block), and reducewrite amplification.

In some embodiments, reducing (601) over-provisioning includes: (1)detecting a first wear condition of non-volatile memory of a storagedevice of a storage system, wherein a total storage capacity of thenon-volatile memory of the storage device includes declared capacity andover-provisioning, and (2) in response to detecting the first wearcondition, performing a remedial action that reduces over-provisioningof the non-volatile memory of the storage device without reducingdeclared capacity of the non-volatile memory of the storage device. Insome embodiments, performing a remedial action that reducesover-provisioning includes marking one or more blocks of thenon-volatile memory as unusable. In some embodiments, performing aremedial action that reduces over-provisioning includes converting oneor more MLC blocks to SLC, or more generally, changing the physicalencoding format of one or more blocks of the non-volatile memory. Insome embodiments, reducing over-provisioning is performed by anover-provisioning module of management module 121, system managementmodule 151, or cluster management module 181 (e.g., in memory 206 ofFIGS. 2A-1 and 2A-2, in memory 246 of FIGS. 2B-1 and 2B-2, or in memory276 of FIGS. 2C-1 and 2C-2, respectively, but not explicitly shown).Furthermore, in some circumstances or in some embodiments,over-provisioning reducing operation 601 is performed multiple timesprior to the first time operation 602 is performed. For example,over-provisioning reducing operation 601 may be repeated each ofmultiple times that a predefined wear condition is detected, untilover-provisioning falls to or below a predefined minimum level.

In some embodiments, the first wear condition is detected in accordancewith one or more metrics of the storage device (e.g., including one ormore status metrics corresponding to the storage device's ability toretain data, one or more performance metrics corresponding toperformance of the storage device, one or more wear metricscorresponding to wear on the storage device, and/or one or more timemetrics), as described above with respect to operation 602. In someembodiments, the first wear condition is detected in accordance with adetermination that the one or more metrics of the storage device satisfya first criterion and over-provisioning of the non-volatile memory ofthe storage device is greater than a predefined threshold (e.g., 2percent of the declared capacity, at least 100 blocks, or 40 blocks+n %of declared capacity, etc.).

In some embodiments, detecting the trigger condition (as described abovewith respect to operation 602) comprises detecting a second wearcondition distinct from the first wear condition. For example, in someembodiments, the trigger condition (or the second wear condition) isdetected in accordance with a determination that the one or more metricsof the storage device satisfy a second criterion (e.g., the firstcriterion used for the first wear condition or another criterion) andover-provisioning of the non-volatile memory of the storage device isless than or equal to (e.g., not greater than) a predefined threshold(e.g., 2 percent of the declared capacity, at least 100 blocks, or 40blocks+n % of declared capacity, etc.).

FIGS. 7A-7D illustrate a flowchart representation of a method 700 ofmanaging a storage system, in accordance with some embodiments. At leastin some embodiments, method 700 is performed by a storage device (e.g.,storage device 120, FIG. 1A, storage device 160, FIG. 1B, or storagedevice 194, FIG. 1C) or one or more components of the storage device(e.g., storage controller 124, FIG. 1A), wherein the storage device isoperatively coupled with a host system (e.g., computer system 110, FIG.1A, computer system 142, FIG. 1B, computer system 172, FIG. 1C, storagesystem controller 150, FIG. 1B, or cluster controller 180, FIG. 1C). Insome embodiments, method 700 is governed by instructions that are storedin a non-transitory computer readable storage medium and that areexecuted by one or more processors of a device, such as the one or moreprocessing units (CPUs) 122-1 of management module 121-1, shown in FIGS.1A and 2A-1. In some embodiments, method 700 is performed by a storagesystem (e.g., data storage system 100, FIG. 1A, data storage system 140,FIG. 1B, and/or data storage system 170, FIG. 1C) or one or morecomponents of the storage system (e.g., storage device 120, FIG. 1A,storage device 160, FIG. 1B, or storage device 194, FIG. 1C). In someembodiments, some of the operations of method 700 are performed at astorage device (e.g., storage device 120, FIG. 1A, storage device 160,FIG. 1B, or storage device 194, FIG. 1C) and information is transmittedto a host (e.g., computer system 110, FIG. 1A, computer system 142, FIG.1B, computer system 172, FIG. 1C, storage system controller 150, FIG.1B, or cluster controller 180, FIG. 1C). For ease of explanation, thefollowing describes method 700 as performed by a storage device (e.g.,storage device 120, FIG. 1A) of a storage system (e.g., data storagesystem 100, FIG. 1A). However, those skilled in the art will appreciatethat in other embodiments, one or more of the operations described inmethod 700 are performed by a storage device of another storage system(e.g., storage device 160 of data storage system 140, FIG. 1B, orstorage device 194 of data storage system 170, FIG. 1C).

At a storage device of a storage system (702), the storage device (e.g.,storage device 120, FIG. 1A) generates (704) one or more metrics of thestorage device, the storage device including non-volatile memory. Insome embodiments, a metrics module (e.g., metrics module 222-1, FIG.2A-1) is used to generate one or more metrics of the storage device, thestorage device including non-volatile memory, as described above withrespect to FIG. 2A-1.

In some embodiments, the storage device comprises (712) one or moreflash memory devices. In some embodiments, the storage device comprisesa storage medium (e.g., storage medium 130, FIG. 1A), and the storagemedium comprises one or more non-volatile storage devices, such as flashmemory devices. In some embodiments, the storage medium (e.g., storagemedium 130, FIG. 1A) is a single flash memory device, while in otherembodiments the storage medium includes a plurality of flash memorydevices. For example, in some embodiments, the storage medium includesdozens or hundreds of flash memory devices, organized in parallel memorychannels, such as 16, 32 or 64 flash memory devices per memory channel,and 8, 16 or 32 parallel memory channels. In some embodiments, thenon-volatile storage medium (e.g., storage medium 130, FIG. 1A) includesNAND-type flash memory or NOR-type flash memory. In other embodiments,the storage medium comprises one or more other types of non-volatilestorage devices.

In some embodiments, generating (714) one or more metrics of the storagedevice includes generating at least one metric, of the one or moremetrics, for each memory portion of a plurality of memory portions ofthe storage device. In some embodiments, at least one metric isgenerated for each block of a plurality of blocks of the storage device.In some embodiments, at least one metric is generated for each page of aplurality of pages of the storage device. In some embodiments, at leastone metric is generated for each region of a plurality of regions of thestorage device. In some embodiments, some metrics are generated on ablock basis, some metrics are generated on a page basis, some metricsare generated on a region basis, and/or some metrics are generated on astorage device basis.

In some embodiments, the one or more metrics of the storage deviceinclude (716) one or more status metrics corresponding to the storagedevice's ability (e.g., ability of the storage device's storage mediumor storage media) to retain data. In some embodiments, storagecontroller 124 (FIG. 1A) or a component thereof (e.g., metrics module222-1, FIG. 2A-1) generates and/or maintains one or more status metricsfor each memory portion of a plurality of memory portions (e.g., instorage medium 130, FIG. 1A) of the storage device. In some embodiments,the one or more status metrics indicate a respective memory portion'sability to retain data. In some embodiments, the one or more statusmetrics associated with a respective memory portion, of a plurality ofmemory portions of the storage device, are stored in a characterizationvector corresponding to the respective memory portion. In someembodiments, the one or more status metrics stored in thecharacterization vector for the respective memory portion include asubset or superset of: (a) a bytes written field indicating a number ofbytes of data written to pages in the respective memory portion, (b) aprogram-erase (P/E) cycle field indicating a current count of the numberof P/E cycles performed on the respective memory portion, (c) a biterror rate (BER) field indicating a number of errors detected in acodeword read from pages of the respective memory portion, and (d) otherusage information indicating the health, performance, and/or enduranceof the respective memory portion, as it relates to the respective memoryportion's ability to retain data. In some embodiments, the one or morestatus metrics indicate the storage device's ability, as a whole, toretain data. For example, as the storage device ages, the one or morestatus metrics reflect the storage device's diminished ability to retaindata (e.g., data read from the storage device typically have more errorsas the storage device ages).

In some embodiments, the one or more metrics of the storage deviceinclude (718) one or more performance metrics corresponding toperformance of the storage device. In some embodiments, storagecontroller 124 (FIG. 1A) or a component thereof (e.g., metrics module222-1, FIG. 2A-1) generates and/or maintains one or more performancemetrics for each memory portion of a plurality of memory portions (e.g.,in storage medium 130, FIG. 1A) of the storage device. In someembodiments, the one or more performance metrics correspond toperformance of a respective memory portion of the plurality of memoryportions. In some embodiments, the one or more performance metricsassociated with a respective memory portion, of a plurality of memoryportions of the storage device, are stored in a characterization vectorcorresponding to the respective memory portion. In some embodiments, theone or more performance metrics stored in the characterization vectorfor the respective memory portion include a subset or superset of: (a) ameasure of latency, and (b) transaction time. In some embodiments, theone or more performance metrics correspond to performance of the storagedevice as a whole. For example, in some embodiments, the one or moreperformance metrics include a measure of latency for the storage deviceand/or transaction time for the storage device.

In some embodiments, the one or more metrics of the storage deviceinclude (720) one or more wear metrics corresponding to wear on thestorage device. In some embodiments, storage controller 124 (FIG. 1A) ora component thereof (e.g., metrics module 222-1, FIG. 2A-1) generatesand/or maintains one or more wear metrics for each memory portion of aplurality of memory portions (e.g., in storage medium 130, FIG. 1A) ofthe storage device. In some embodiments, the one or more wear metricscorrespond to wear on a respective memory portion of the plurality ofmemory portions. In some embodiments, the one or more wear metricsassociated with a respective memory portion, of a plurality of memoryportions of the storage device, are stored in a characterization vectorcorresponding to the respective memory portion. In some embodiments, theone or more wear metrics stored in the characterization vector for therespective memory portion include a subset or superset of: (a) a countof cumulative writes to the respective memory portion, (b) a count ofcumulative reads from the respective memory portion, (c) a count of P/Ecycles performed on the respective memory portion, and (d) a BER for therespective memory portion. In some embodiments, the one or more wearmetrics correspond to wear on the storage device as a whole. Forexample, in some embodiments, the one or more wear metrics include acount of cumulative writes to the storage device (e.g., to the storagedevice's storage medium or storage media), a count of cumulative readsfrom the storage device (e.g., from the storage device's storage mediumor storage media), a count of P/E cycles performed on the storage deviceand/or a BER for the storage device.

In some embodiments, the one or more metrics of the storage deviceinclude (722) one or more time metrics. In some embodiments, storagecontroller 124 (FIG. 1A) or a component thereof (e.g., metrics module222-1, FIG. 2A-1) generates and/or maintains one or more time metrics.In some embodiments, the one or more time metrics include a wall-clocktime.

In some embodiments, the one or more metrics of the storage deviceinclude (724) values of the one or more metrics from more than one time.For example, in some embodiments, the one or more metrics of the storagedevice include a count of cumulative writes to the storage device (e.g.,to the storage device's storage medium or storage media) at a first timeand a count of cumulative writes to the storage device (e.g., to thestorage device's storage medium or storage media) at a second time. Insome embodiments, values of the one or more metrics from more than onetime include historical knowledge of the one or more metrics. Forexample, in some embodiments, the one or more metrics from more than onetime include a running average of the one or more metrics. In anotherexample, historical knowledge can be used to determine (e.g., compute)one or more projected values of one or more metrics at a particular timein the future (e.g., an hour, day, week, or month in the future). Insome embodiments, historical knowledge of the one or more metrics of thestorage device is used to detect a trigger condition, as described belowwith respect to operation 706.

At a storage device of a storage system (702), the storage device (e.g.,storage device 120, FIG. 1A) detects (706) a trigger condition inaccordance with the one or more metrics of the storage device. In someembodiments, the trigger condition is detected in accordance with anon-linear and/or linear combination of the one or more metrics. In someembodiments, the trigger condition is detected in accordance withhistorical knowledge of the one or more metrics, as described above withrespect to operation 602 of FIG. 6. In some embodiments, a triggerdetection module (e.g., trigger detection module 224-1, FIG. 2A-1) isused to detect a trigger condition in accordance with the one or moremetrics of the storage device, as described above with respect to FIG.2A-1. Furthermore, in some embodiments, prior to detecting the triggercondition (706), the storage device detects a wear condition and reducesover-provisioning of the non-volatile memory of the storage device,without reducing declared capacity of the non-volatile memory of thestorage device, as described above with respect to operation 601 of FIG.6.

At a storage device of a storage system (702), the storage device (e.g.,storage device 120, FIG. 1A) enables (708) an amelioration processassociated with the detected trigger condition, the amelioration processto reduce declared capacity of the non-volatile memory of the storagedevice. In some embodiments, the amelioration process includes a processto reduce utilization by a host, a process to reduce declared capacityof the non-volatile memory of the storage device, and/or a process toadvertise a reduced declared capacity. In some embodiments, theamelioration process includes altering an encoding format (e.g., fromTLC to SLC and/or changing the redundancy mechanism) of at least aportion of the non-volatile memory of the storage device. In someembodiments, altering the encoding format of at least a portion of thenon-volatile memory of the storage device includes setting the encodingformat of an entirety of the non-volatile memory of the storage deviceto a low-density physical encoding format, for example SLC. For example,prior to the amelioration process the storage device includes someblocks (e.g., 98%) encoded as TLC and other blocks (e.g., 2%) encoded asSLC, and after the amelioration process all blocks are encoded using thelower-density physical encoding format, SLC. The latter example maycorrespond to a storage device that initially stores all client datausing TLC and all storage device metadata using SLC. The ameliorationprocess converts all of the client data from TLC to SLC without changingthe encoding format of the storage device metadata (SLC). In someembodiments, an enabling module (e.g., enabling module 226-1, FIG. 2A-1)is used to enable an amelioration process associated with the detectedtrigger condition, the amelioration process to reduce declared capacityof the non-volatile memory of the storage device, as described abovewith respect to FIG. 2A-1.

In some embodiments, the amelioration process to reduce declaredcapacity of the non-volatile memory of the storage device includes aprocess to reduce utilization of the non-volatile memory of the storagedevice, for example as described above with respect to operation 608 ofFIG. 6.

In some embodiments, enabling the amelioration process associated withthe detected trigger condition includes (726) notifying a host (e.g.,computer system 110, FIG. 1A, computer system 142, FIG. 1B, computersystem 172, FIG. 1C, storage system controller 150, FIG. 1B, and/orcluster controller 180, FIG. 1C) to which the storage device isoperatively coupled of the trigger condition. In some embodiments,notifying the host of the trigger condition includes notifying the hostwith an unsolicited communication. For example, in some embodiments, theunsolicited communication includes an interrupt communication. Asanother example, in some embodiments, the unsolicited communicationincludes a remote direct memory access (RDMA). As yet another example,in some embodiments, the unsolicited communication includes a TCPconnection request or a TCP data transmission. In some embodiments, theunsolicited communication includes any other form of unsolicitedcommunication.

In some embodiments, the host includes (728) a client on behalf of whichdata is stored in the storage system (e.g., data storage system 100,FIG. 1A; data storage system 140, FIG. 1B; data storage system 170, FIG.1C). In some embodiments, the client is or includes an entity on behalfof which data is stored in the storage system. For example, in someembodiments, the host is (1) computer system 110 (FIG. 1A) or a clientprocess, module or application executed by computer system 110, (2)computer system 142 (FIG. 1B) or a client process, module or applicationexecuted by computer system 142, and/or (3) computer system 172 (FIG.1C) or a client process, module or application executed by computersystem 172.

In some embodiments, the host includes (730) a storage system controllerof the storage system (e.g., data storage system 140, FIG. 1B). In someembodiments, the storage system controller controls and/or coordinatesoperations among one or more storage devices. For example, in someembodiments, the host is storage system controller 150 (FIG. 1B). Insome of these embodiments, the data storage system (e.g., data storagesystem 140, FIG. 1B) is called a scale-up system.

In some embodiments, the host includes (732) a cluster controller of thestorage system (e.g., data storage system 170, FIG. 1C). In someembodiments, the cluster controller controls and/or coordinatesoperations among one or more data storage subsystems, as shown forexample in FIG. 1C, where each of the data storage subsystems may beimplemented as a data storage system having one or more storage devices(e.g., data storage system 140, FIG. 1B). For example, in someembodiments, the host is cluster controller 180 (FIG. 1C). In some ofthese embodiments, the data storage system (e.g., data storage system170, FIG. 1C) is called a scale-out system or sometimes known as aclustered storage system.

In some embodiments, enabling the amelioration process associated withthe detected trigger condition includes (734): (1) receiving a queryfrom a host (e.g., computer system 110, FIG. 1A, computer system 142,FIG. 1B, computer system 172, FIG. 1C, storage system controller 150,FIG. 1B, and/or cluster controller 180, FIG. 1C) to which the storagedevice is operatively coupled, and (2) in response to receiving thequery, reporting the trigger condition. For example, in someembodiments, the host polls for the trigger condition and the storagedevice receives the query from the host and in response to receiving thequery, reports the trigger condition.

In some embodiments, enabling the amelioration process associated withthe detected trigger condition includes (736): (1) receiving a commandfrom a host (e.g., computer system 110, FIG. 1A, computer system 142,FIG. 1B, computer system 172, FIG. 1C, storage system controller 150,FIG. 1B, and/or cluster controller 180, FIG. 1C) to which the storagedevice is operatively coupled, and (2) in response to receiving thecommand, sending a response to the command and a notification of thetrigger condition. In some embodiments, the command includes an I/O(input/output) request. In some embodiments, the I/O request includes aread request from the storage device and/or a write request to thestorage device. In some embodiments, the command includes a request fortemperature of the storage device. In some embodiments, the commandincludes a request for some other status of the storage device. In someembodiments, the notification of the trigger condition is piggy-backedon a response to the command from the host. For example, in someembodiments, the host issues a read request for data from the storagedevice, and the storage device (1) receives the read request from thehost, and (2) in response to receiving the read request, the storagedevice sends data corresponding to the read request and a notificationof the trigger condition.

In some embodiments, enabling the amelioration process associated withthe detected trigger condition includes (738): (1) receiving a commandfrom a host (e.g., computer system 110, FIG. 1A, computer system 142,FIG. 1B, computer system 172, FIG. 1C, storage system controller 150,FIG. 1B, and/or cluster controller 180, FIG. 1C) to which the storagedevice is operatively coupled, and (2) in response to receiving thecommand, sending a response to the command and a notification thatprompts the host to obtain information with respect to the triggercondition. In some embodiments, the command includes an I/O(input/output) request. In some embodiments, the I/O request includes aread request from the storage device and/or a write request to thestorage device. In some embodiments, the command includes a request fortemperature of the storage device. In some embodiments, the commandincludes a request for some other status of the storage device. In someembodiments, the notification that prompts the host to obtaininformation with respect to the trigger condition is piggy-backed on aresponse to the command from the host. For example, in some embodiments,the host issues a read request for data from the storage device, and thestorage device (1) receives the read request from the host, and (2) inresponse to receiving the read request, the storage device sends datacorresponding to the read request and a notification (e.g., by setting anotification bit) that prompts the host to obtain information withrespect to the trigger condition. In some embodiments, the mechanismused for returning such a notification when responding to a command fromthe host is a SCSI deferred error or deferred error response code.

Although a few examples of notification are described here, thoseskilled in the art will appreciate that the embodiments described hereinmay be extended to other notification methods (e.g., read-only modenotification, as described below with respect to operation 1028 of FIG.10C).

In some embodiments, enabling the amelioration process associated withthe detected trigger condition includes (740) scheduling theamelioration process to be performed on the storage device. For example,in some embodiments, the trigger condition feeds back to the storagedevice and the storage device enables the amelioration process byscheduling the amelioration process to be performed on the storagedevice. In some embodiments, however, the amelioration process isperformed, at least in part, by an apparatus other than the storagedevice (e.g., performed at least in part by the host, or by a storagesystem controller or by a cluster controller of a data storage systemthat includes at least one storage device distinct from the storagedevice).

In some embodiments, enabling the amelioration process associated withthe detected trigger condition includes (742) determining one or moreparameters for the amelioration process. In some embodiments, the one ormore parameters for the amelioration process include a level of urgencyfor the amelioration process, a target reduced declared capacity of thenon-volatile memory of the storage device, and/or a target amount ofreduction in utilization of the non-volatile memory of the storagedevice, or any combination or subset thereof. For example, in someembodiments or in some circumstances, the one or more parameters for theamelioration process include a parameter indicating that the urgencylevel is high (e.g., the amelioration process needs to begin within thenext hour) and a parameter indicating that at least 1 GB of storagecapacity needs to be reduced in the storage device.

In some embodiments, enabling the amelioration process associated withthe detected trigger condition further includes (744) reporting at leasta subset of the one or more parameters for the amelioration process. Forexample, in some embodiments, enabling the amelioration processassociated with the detected trigger condition further includesreporting a target reduction in storage capacity of the non-volatilememory in the storage device.

In some embodiments, after enabling the amelioration process (710): thestorage device (1) re-evaluates the trigger condition in accordance withthe one or more metrics of the storage device, and (2) in accordancewith a determination that the trigger condition is no longer valid,aborts the amelioration process to reduce declared capacity of thenon-volatile memory of the storage device. For example, in somecircumstances, the one or more metrics of the storage device may changesuch that the trigger condition is no longer valid (e.g., theamelioration process is no longer needed). For example, during theoperation of the amelioration process, normal storage operations willcontinue to be performed (e.g., read, write, delete, trim, etc.). Normalstorage operations include operations like trim that explicitly reducethe storage device utilization, possibly enough to merit aborting theamelioration process. Other storage activity such as garbage collectionmay also reduce utilization, possibly enough to merit aborting theamelioration process. In some embodiments, the trigger condition is(e.g., periodically, semi-continuously, irregularly, initially, finally,etc.) re-evaluated in accordance with the one or more metrics of thestorage device, as the one or more metrics may change in value due tothe amelioration process and/or normal storage operations (e.g., read,write, erase and trim or unmap operations). In some embodiments, atrigger detection module (e.g., trigger detection module 224-1, FIG.2A-1) and/or an enabling module (e.g., enabling module 226-1, FIG. 2A-1)are used to, after enabling the amelioration process, (1) re-evaluatethe trigger condition in accordance with the one or more metrics of thestorage device, and (2) in accordance with a determination that thetrigger condition is no longer valid, abort the amelioration process toreduce declared capacity of the non-volatile memory of the storagedevice, as described above with respect to FIG. 2A-1.

In some embodiments, any operations of method 700 described above areperformed by a storage device, the storage device including (1)non-volatile memory (e.g., comprising one or more non-volatile storagedevices, such as flash memory devices), (2) one or more processors, and(3) controller memory (e.g., non-volatile memory or volatile memory inor coupled to the controller) storing one or more programs, which whenexecuted by the one or more processors cause the storage device toperform or control performance of any of the methods described herein.

In some embodiments, any operations of method 700 described above areperformed by a storage device including means for performing any of themethods described herein.

In some embodiments, any operations of method 700 described above areperformed by a storage system comprising (1) a storage medium (e.g.,comprising one or more non-volatile storage devices, such as flashmemory devices) (2) one or more processors, and (3) memory (e.g.,non-volatile memory or volatile memory in the storage system) storingone or more programs, which when executed by the one or more processorscause the storage system to perform or control performance of any of themethods described herein.

FIGS. 8A-8D illustrate a flowchart representation of a method 800 ofmanaging a storage system, in accordance with some embodiments. In someembodiments, method 800 is performed by a host (e.g., computer system110, FIG. 1A, computer system 142, FIG. 1B, computer system 172, FIG.1C, storage system controller 150, FIG. 1B, or cluster controller 180,FIG. 1C) or one or more components of the host (e.g., management module121-2, FIG. 1A, system management module 151, FIG. 1B, or clustermanagement module 181, FIG. 1C). In some embodiments, method 800 isgoverned by instructions that are stored in a non-transitory computerreadable storage medium and that are executed by one or more processorsof a host, such as the one or more processing units (CPUs) 152-1 ofsystem management module 151-1, shown in FIGS. 1B and 2B-1, or the oneor more processing units (CPUs) 182-1 of cluster management module181-1, shown in FIGS. 1C and 2C-1. In some embodiments, method 800 isperformed by a storage system (e.g., data storage system 100, FIG. 1A,data storage system 140, FIG. 1B, or data storage system 170, FIG. 1C)or one or more components of the storage system (e.g., computer system110, FIG. 1A, storage system controller 150, FIG. 1B, or clustercontroller 180, FIG. 1C). In some embodiments, some of the operations ofmethod 800 are performed at a host (e.g., computer system 110, FIG. 1A,computer system 142, FIG. 1B, or computer system 172, FIG. 1C) andinformation is transmitted to a storage device (e.g., storage device120, FIG. 1A) and/or one or more subsystems of a storage system (e.g.,storage system controller 150, FIG. 1B, or cluster controller 180, FIG.1C). In some embodiments, method 800 is governed, at least in part, byinstructions that are stored in a non-transitory computer readablestorage medium and that are executed by one or more processors of a host(processors of host not shown in FIGS. 1A, 1B, and 1C).

In some embodiments, the host includes (812) a client on behalf of whichdata is stored in the storage system (e.g., data storage system 100,FIG. 1A; data storage system 140, FIG. 1B; data storage system 170, FIG.1C). In some embodiments, the client is or includes an entity on behalfof which data is stored in the storage system. For example, in someembodiments, the host is computer system 110 (FIG. 1A) or a clientprocess or application executed by computer system 110, or is a computersystem 142 (FIG. 1B) or a client process or application executed bycomputer system 142, or computer system 172 (FIG. 1C) or a clientprocess or application executed by computer system 172.

In some embodiments, the host includes (814) a storage system controllerof the storage system (e.g., data storage system 140, FIG. 1B). In someembodiments, the storage system controller controls and/or coordinatesoperations among one or more storage devices. For example, in someembodiments, the host is storage system controller 150 (FIG. 1B). Insome of these embodiments, the data storage system (e.g., data storagesystem 140, FIG. 1B) is called a scale-up system.

In some embodiments, the host includes (816) a cluster controller of thestorage system (e.g., data storage system 170, FIG. 1C). In someembodiments, the cluster controller controls and/or coordinatesoperations among one or more data storage subsystems, as shown forexample in FIG. 1C, where each of the data storage subsystems may beimplemented as a data storage system having one or more storage devices(e.g., data storage system 140, FIG. 1B). For example, in someembodiments, the host is cluster controller 180 (FIG. 1C). In some ofthese embodiments, the data storage system (e.g., data storage system170, FIG. 1C) is called a scale-out system or a clustered storagesystem.

At a host to which a storage device of the storage system is operativelycoupled (802), the host obtains (804) one or more metrics of the storagedevice (e.g., storage device 120, FIG. 1A, a particular storage device160, FIG. 1B, or a particular storage device 194, FIG. 1C), the storagedevice including non-volatile memory. In some embodiments, the storagedevice generates and/or maintains the one or more metrics of the storagedevice, and the host obtains the one or more metrics from the storagedevice. In some embodiments, one or more subsystems of a storage systemdistinct from the storage device (e.g., storage system controller 150,FIG. 1B, or cluster controller 180, FIG. 1C) generate and/or maintainthe one or more metrics of the storage device, and the host obtains theone or more metrics from the one or more subsystems. In someembodiments, the host generates and/or maintains the one or more metricsof the storage device. In some embodiments, a metrics module (e.g.,metrics module 222-2, FIG. 2A-2) is used to obtain one or more metricsof the storage device, the storage device including non-volatile memory,as described above with respect to FIG. 2A-2.

In some embodiments, the storage device comprises (818) one or moreflash memory devices. In some embodiments, the storage device comprisesa storage medium (e.g., storage medium 130, FIG. 1A), and the storagemedium comprises one or more non-volatile storage devices, such as flashmemory devices. In some embodiments, the storage medium (e.g., storagemedium 130, FIG. 1A) is a single flash memory device, while in otherembodiments the storage medium includes a plurality of flash memorydevices. For example, in some embodiments, the storage medium includesdozens or hundreds of flash memory devices, organized in parallel memorychannels, such as 16, 32 or 64 flash memory devices per memory channel,and 8, 16 or 32 parallel memory channels. In some embodiments, thenon-volatile storage medium (e.g., storage medium 130, FIG. 1A) includesNAND-type flash memory or NOR-type flash memory. In other embodiments,the storage medium comprises one or more other types of non-volatilestorage devices.

In some embodiments, obtaining (804) one or more metrics of the storagedevice includes obtaining (820) at least one metric, of the one or moremetrics, for each memory portion (e.g., block, page, region, etc.) of aplurality of memory portions of the storage device. In some embodiments,at least one metric is generated for each block of a plurality of blocksof the storage device. In some embodiments, at least one metric isgenerated for each page of a plurality of pages of the storage device.In some embodiments, at least one metric is generated for each region ofa plurality of regions of the storage device. In some embodiments, somemetrics are generated on a block basis, some metrics are generated on apage basis, some metrics are generated on a region basis, and/or somemetrics are generated on a storage device basis.

In some embodiments, the one or more metrics of the storage deviceinclude (822) one or more status metrics corresponding to the storagedevice's ability to retain data. In some embodiments, the host or acomponent thereof (e.g., metrics module 222-2, FIG. 2A-2) generatesand/or maintains one or more status metrics for each memory portion of aplurality of memory portions (e.g., in storage medium 130, FIG. 1A) ofthe storage device. In some embodiments, the one or more status metricsindicate a respective memory portion's ability to retain data. In someembodiments, the one or more status metrics associated with a respectivememory portion, of a plurality of memory portions of the storage device,are stored in a characterization vector corresponding to the respectivememory portion. In some embodiments, the one or more status metricsstored in the characterization vector for the respective memory portioninclude a subset or superset of: (a) a bytes written field indicating anumber of bytes of data written to pages in the respective memoryportion, (b) a program-erase (P/E) cycle field indicating a currentcount of the number of P/E cycles performed on the respective memoryportion, (c) a bit error rate (BER) field indicating a number of errorsincluded in a codeword read from pages of the respective memory portion,and (d) other usage information indicating the health, performance,and/or endurance of the respective memory portion, as it relates to therespective memory portion's ability to retain data. In some embodiments,the one or more status metrics indicate the storage device's ability, asa whole, to retain data. For example, as the storage device ages, theone or more status metrics reflect the storage device's diminishedability to retain data (e.g., data read from the storage device includesmore errors as the storage device ages).

In some embodiments, the one or more metrics of the storage deviceinclude (824) one or more performance metrics corresponding toperformance of the storage device. In some embodiments, the host or acomponent thereof (e.g., metrics module 222-2, FIG. 2A-2) generatesand/or maintains one or more performance metrics for each memory portionof a plurality of memory portions (e.g., in storage medium 130, FIG. 1A)of the storage device. In some embodiments, the one or more performancemetrics correspond to performance of a respective memory portion of theplurality of memory portions. In some embodiments, the one or moreperformance metrics associated with a respective memory portion, of aplurality of memory portions of the storage device, are stored in acharacterization vector corresponding to the respective memory portion.In some embodiments, the one or more performance metrics stored in thecharacterization vector for the respective memory portion include asubset or superset of: (a) a measure of latency, and (b) transactiontime. In some embodiments, the one or more performance metricscorrespond to performance of the storage device as a whole. For example,in some embodiments, the one or more performance metrics include ameasure of latency for the storage device and/or transaction time forthe storage device.

In some embodiments, the one or more metrics of the storage deviceinclude (826) one or more wear metrics corresponding to wear on thestorage device. In some embodiments, the host or a component thereof(e.g., metrics module 222-2, FIG. 2A-2) generates and/or maintains oneor more wear metrics for each memory portion of a plurality of memoryportions (e.g., in storage medium 130, FIG. 1A) of the storage device.In some embodiments, the one or more wear metrics correspond to wear ona respective memory portion of the plurality of memory portions. In someembodiments, the one or more wear metrics associated with a respectivememory portion, of a plurality of memory portions of the storage device,are stored in a characterization vector corresponding to the respectivememory portion. In some embodiments, the one or more wear metrics storedin the characterization vector for the respective memory portion includea subset or superset of: (a) a count of cumulative writes to therespective memory portion, (b) a count of cumulative reads from therespective memory portion, (c) a count of P/E cycles performed on therespective memory portion, and (d) a BER for the respective memoryportion. In some embodiments, the one or more wear metrics correspond towear on the storage device as a whole. For example, in some embodiments,the one or more wear metrics include a count of cumulative writes to thestorage device, a count of cumulative reads from the storage device, acount of P/E cycles performed on the storage device and/or a BER for thestorage device.

In some embodiments, the one or more metrics of the storage deviceinclude (828) one or more time metrics. In some embodiments, the host ora component thereof (e.g., metrics module 222-2, FIG. 2A-2) generatesand/or maintains one or more time metrics. In some embodiments, the oneor more time metrics include a wall-clock time.

In some embodiments, the one or more metrics of the storage deviceinclude (830) values of the one or more metrics from more than one time.For example, in some embodiments, the one or more metrics of the storagedevice include a count of cumulative writes to the storage device at afirst time and a count of cumulative writes to the storage device at asecond time. In some embodiments, values of the one or more metrics frommore than one time include historical knowledge of the one or moremetrics. For example, in some embodiments, the one or more metrics frommore than one time include a running average of the one or more metrics.In another example, historical knowledge can be used to determine (e.g.,compute) one or more projected values of one or more metrics at aparticular time in the future (e.g., an hour, day, week, or month in thefuture). In some embodiments, historical knowledge of the one or moremetrics of the storage device is used to detect a trigger condition, asdescribed below with respect to operation 806.

At a host to which a storage device of the storage system is operativelycoupled (802), the host detects (806) a trigger condition in accordancewith the one or more metrics of the storage device. In some embodiments,the trigger condition is detected in accordance with a non-linear and/orlinear combination of the one or more metrics. In some embodiments, thetrigger condition is detected in accordance with historical knowledge ofthe one or more metrics. In some embodiments, a trigger detection module(e.g., trigger detection module 224-2, FIG. 2A-2) is used to detect atrigger condition in accordance with the one or more metrics of thestorage device, as described above with respect to FIG. 2A-2.Furthermore, in some embodiments, prior to detecting the triggercondition (806), the host detects a wear condition and reducesover-provisioning of the non-volatile memory of the storage device,without reducing declared capacity of the non-volatile memory of thestorage device, as described above with respect to operation 601 of FIG.6.

At a host to which a storage device of the storage system is operativelycoupled (802), the host enables (808) an amelioration process associatedwith the detected trigger condition, the amelioration process to reducedeclared capacity of the non-volatile memory of the storage device. Insome embodiments, the amelioration process includes a process to reduceutilization by a host, a process to reduce declared capacity of thenon-volatile memory of the storage device, and/or a process to advertisea reduced declared capacity. In some embodiments, the ameliorationprocess includes altering an encoding format (e.g., from TLC to SLCand/or changing the redundancy mechanism) of at least a portion of thenon-volatile memory of the storage device. In some embodiments, alteringthe encoding format of at least a portion of the non-volatile memory ofthe storage device includes setting the encoding format of an entiretyof the non-volatile memory of the storage device to a low-densityphysical encoding format, for example SLC. For example, prior to theamelioration process the storage device includes some blocks (e.g., 98%)encoded as TLC and other blocks (e.g., 2%) encoded as SLC, and after theamelioration process all blocks are encoded using the lower-densityphysical encoding format, SLC. The latter example may correspond to astorage device that initially stores all client data using TLC and allstorage device metadata using SLC. The amelioration process converts allof the client data from TLC to SLC without changing the encoding formatof the storage device metadata (SLC). In some embodiments, an enablingmodule (e.g., enabling module 226-2, FIG. 2A-2) is used to enable anamelioration process associated with the detected trigger condition, theamelioration process to reduce declared capacity of the non-volatilememory of the storage device, as described above with respect to FIG.2A-2.

In some embodiments, the amelioration process to reduce declaredcapacity of the non-volatile memory of the storage device includes aprocess to reduce utilization of the non-volatile memory of the storagedevice, for example as described above with respect to operation 608 ofFIG. 6.

In some embodiments, enabling (808) the amelioration process associatedwith the detected trigger condition includes scheduling (832) theamelioration process to be performed on the storage device. For example,in some embodiments, the trigger condition feeds back to the host andthe host enables the amelioration process by scheduling the ameliorationprocess to be performed on the storage device.

In some embodiments, enabling (808) the amelioration process associatedwith the detected trigger condition includes determining (834) one ormore parameters for the amelioration process. In some embodiments, theone or more parameters for the amelioration process include a level ofurgency for the amelioration process, a target reduced declared capacityof the non-volatile memory of the storage device, and/or a target amountof reduction in utilization of the non-volatile memory of the storagedevice, or any combination or subset thereof. For example, in someembodiments, the one or more parameters for the amelioration processinclude a parameter indicating that the urgency level is high (e.g., theamelioration process needs to begin within the next hour) and aparameter indicating that at least 1 GB of storage capacity needs to bereduced in the storage device.

In some embodiments, enabling (808) the amelioration process associatedwith the detected trigger condition further includes conveying (836) atleast a subset of the one or more parameters for the ameliorationprocess to the storage device. For example, in some embodiments,enabling the amelioration process associated with the detected triggercondition further includes conveying to the storage device a targetamount of storage capacity of the non-volatile memory that needs to bereduced in the storage device. As another example, in some embodiments,enabling the amelioration process associated with the detected triggercondition further includes conveying to the storage device whichportions of the storage medium (e.g., storage medium 130, FIG. 1A) toreformat by altering an encoding format.

In some embodiments, after enabling the amelioration process (810): thehost re-evaluates the trigger condition in accordance with the one ormore metrics of the storage device, and (2) in accordance with adetermination that the trigger condition is no longer valid, aborts theamelioration process to reduce declared capacity of the non-volatilememory of the storage device. For example, in some circumstances, theone or more metrics of the storage device may change such that thetrigger condition is no longer valid (e.g., the amelioration process isno longer needed). For example, during the operation of an ameliorationprocess (e.g., operation 606, FIG. 6), normal storage operations willcontinue to be performed (e.g., read, write, delete, trim, etc.). Normalstorage operations include operations like trim that explicitly reducethe storage device utilization, possibly enough to merit aborting theamelioration process. Other storage activity such as garbage collectionmay also reduce utilization, possibly enough to merit aborting theamelioration process. In some embodiments, the trigger condition is(e.g., periodically, semi-continuously, irregularly, initially, finally,etc.) re-evaluated in accordance with the one or more metrics of thestorage device, as the one or more metrics may change in value due tothe amelioration process and/or normal storage operations (e.g., read,write, erase and trim or unmap operations). In some embodiments, atrigger detection module (e.g., trigger detection module 224-2, FIG.2A-2) and/or an enabling module (e.g., enabling module 226-2, FIG. 2A-2)are used to, after enabling the amelioration process, (1) re-evaluatethe trigger condition in accordance with the one or more metrics of thestorage device, and (2) in accordance with a determination that thetrigger condition is no longer valid, abort the amelioration process toreduce declared capacity of the non-volatile memory of the storagedevice, as described above with respect to FIG. 2A-2.

In some embodiments, any of the methods described above are performed bya storage system, the storage system including (1) one or more storagedevices (e.g., comprising one or more non-volatile storage devices, suchas flash memory devices), (2) a host to which the one or more storagedevices are operatively coupled, (3) one or more processors, and (4)controller memory storing one or more programs, which when executed bythe one or more processors cause the host to perform or controlperformance of any of the methods described herein.

In some embodiments, any of the methods described above are performed bya host system, coupled to one or more storage devices, the host systemincluding means for performing any of the methods described herein.

In some embodiments, any operations of method 800 described above areperformed by a host system comprising (1) an interface for operativelycoupling to a storage system, (2) one or more processors, and (3)controller memory storing one or more programs, which when executed bythe one or more processors cause the host system to perform or controlperformance of any of the methods described herein.

FIGS. 9A-9D illustrate a flowchart representation of a method 900 ofmanaging a storage system, in accordance with some embodiments. At leastin some embodiments, method 900 is performed by a storage system (e.g.,data storage system 100, FIG. 1A, data storage system 140, FIG. 1B, ordata storage system 170, FIG. 1C) or one or more components of thestorage system (e.g., computer system 110, FIG. 1A, storage systemcontroller 150, FIG. 1B, or cluster controller 180, FIG. 1C). In someembodiments, method 900 is governed by instructions that are stored in anon-transitory computer readable storage medium and that are executed byone or more processors of a storage system, such as the one or moreprocessing units (CPUs) 152-1 of system management module 151-1, shownin FIGS. 1B and 2B-1, the one or more processing units (CPUs) 182-1 ofcluster management module 181-1, shown in FIGS. 1C and 2C-1, or one ormore processors of an included host (e.g., computer system 110, FIG.1A), shown in FIG. 2A-2. For ease of explanation, the followingdescribes method 900 as performed by a storage system (e.g., datastorage system 100, FIG. 1A, data storage system 140, FIG. 1B, or datastorage system 170, FIG. 1C). However, those skilled in the art willappreciate that in other embodiments, one or more of the operationsdescribed in method 900 are performed by one or more subsystems of thestorage system distinct from the storage device (e.g., storage systemcontroller 150, FIG. 1B or cluster controller 180, FIG. 1C).

A storage system (e.g., data storage system 100, FIG. 1A, data storagesystem 140, FIG. 1B, or data storage system 170, FIG. 1C) obtains, (902)for each storage device (e.g., storage device 120, FIG. 1A, or any ofstorage devices 160-1 to 160-m of FIG. 1B, or any of storage devices194-1 to 194-n or 194-j to 194-k of FIG. 1C) of a plurality of storagedevices of the storage system, one or more metrics of the storagedevice, the storage device including non-volatile memory. Although FIG.1A only shows one storage device 120, in some embodiments, data storagesystem 100 of FIG. 1A includes a plurality of storage devices, of whichstorage device 120 is one example. In some embodiments, the storagedevice generates and/or maintains the one or more metrics of the storagedevice, and the storage system obtains the one or more metrics from thestorage device. In some embodiments, one or more subsystems of a storagesystem distinct from the storage device (e.g., storage system controller150, FIG. 1B, or cluster controller 180, FIG. 1C) generate and/ormaintain the one or more metrics of the storage device, and the storagesystem obtains the one or more metrics from the one or more subsystems.In some embodiments, a metrics module (e.g., metrics module 222, FIGS.2A-1 and 2A-2; metrics module 252-1, FIG. 2B-1; or metrics module 282-1,FIG. 2C-1) is used to obtain, for each storage device of a plurality ofstorage devices of the storage system, one or more metrics of thestorage device, the storage device including non-volatile memory, asdescribed above with respect to FIGS. 2A-1, 2A-2, 2B-1, and 2C-1.

In some embodiments, obtaining (902) one or more metrics of a respectivestorage device (e.g., storage device 120 of FIG. 1A, a respectivestorage device 160 of FIG. 1B, or a respective storage device 194 ofFIG. 1C) of the plurality of storage devices of the storage systemincludes obtaining (912) at least one metric, of the one or moremetrics, for each memory portion of a plurality of memory portions ofthe respective storage device. In some embodiments, at least one metricis generated for each block of a plurality of blocks of the respectivestorage device. In some embodiments, at least one metric is generatedfor each page of a plurality of pages of the respective storage device.In some embodiments, at least one metric is generated for each region ofa plurality of regions of the respective storage device. In someembodiments, some metrics are generated on a block basis, some metricsare generated on a page basis, some metrics are generated on a regionbasis, and/or some metrics are generated on a storage device basis.

In some embodiments, the one or more metrics of the respective storagedevice include (914) one or more status metrics corresponding to therespective storage device's ability to retain data. In some embodiments,the storage system or a component thereof (e.g., metrics module 222-1,FIG. 2A-1, of the respective storage device; metrics module 252-1, FIG.2B-1, of storage system controller 150; or metrics module 282-1, FIG.2C-1, of cluster controller 180) generates and/or maintains one or morestatus metrics for each memory portion of a plurality of memory portions(e.g., in storage medium 130, FIG. 1A) of the respective storage device.In some embodiments, the one or more status metrics indicate arespective memory portion's ability to retain data. In some embodiments,the one or more status metrics associated with a respective memoryportion, of a plurality of memory portions of the respective storagedevice, are stored in a characterization vector corresponding to therespective memory portion. In some embodiments, the one or more statusmetrics stored in the characterization vector for the respective memoryportion include a subset or superset of: (a) a bytes written fieldindicating a number of bytes of data written to pages in the respectivememory portion, (b) a program-erase (P/E) cycle field indicating acurrent count of the number of P/E cycles performed on the respectivememory portion, (c) a bit error rate (BER) field indicating a number oferrors included in a codeword read from pages of the respective memoryportion, and (d) other usage information indicating the health,performance, and/or endurance of the respective memory portion, as itrelates to the respective memory portion's ability to retain data. Insome embodiments, the one or more status metrics indicate the respectivestorage device's ability, as a whole, to retain data. For example, asthe respective storage device ages, the one or more status metricsreflect the respective storage device's diminished ability to retaindata (e.g., data read from the respective storage device includes moreerrors as the respective storage device ages).

In some embodiments, the one or more metrics of the respective storagedevice include (916) one or more performance metrics corresponding toperformance of the respective storage device. In some embodiments, thestorage system or a component thereof (e.g., metrics module 222-1, FIG.2A-1, of the respective storage device; metrics module 252-1, FIG. 2B-1,of storage system controller 150; or metrics module 282-1, FIG. 2C-1, ofcluster controller 180) generates and/or maintains one or moreperformance metrics for each memory portion of a plurality of memoryportions (e.g., in storage medium 130, FIG. 1A) of the respectivestorage device. In some embodiments, the one or more performance metricscorrespond to performance of a respective memory portion of theplurality of memory portions. In some embodiments, the one or moreperformance metrics associated with a respective memory portion, of aplurality of memory portions of the respective storage device, arestored in a characterization vector corresponding to the respectivememory portion. In some embodiments, the one or more performance metricsstored in the characterization vector for the respective memory portioninclude a subset or superset of: (a) a measure of latency, and (b)transaction time. In some embodiments, the one or more performancemetrics correspond to performance of the respective storage device as awhole. For example, in some embodiments, the one or more performancemetrics include a measure of latency for the respective storage deviceand/or transaction time for the respective storage device.

In some embodiments, the one or more metrics of the respective storagedevice include (918) one or more wear metrics corresponding to wear onthe respective storage device. In some embodiments, the storage systemor a component thereof (e.g., metrics module 222-1, FIG. 2A-1, of therespective storage device; metrics module 252-1, FIG. 2B-1, of storagesystem controller 150; or metrics module 282-1, FIG. 2C-1, of clustercontroller 180) generates and/or maintains one or more wear metrics foreach memory portion of a plurality of memory portions (e.g., in storagemedium 130, FIG. 1A) of the respective storage device. In someembodiments, the one or more wear metrics correspond to wear on arespective memory portion of the plurality of memory portions. In someembodiments, the one or more wear metrics associated with a respectivememory portion, of a plurality of memory portions of the respectivestorage device, are stored in a characterization vector corresponding tothe respective memory portion. In some embodiments, the one or more wearmetrics stored in the characterization vector for the respective memoryportion include a subset or superset of: (a) a count of cumulativewrites to the respective memory portion, (b) a count of cumulative readsfrom the respective memory portion, (c) a count of P/E cycles performedon the respective memory portion, and (d) a BER for the respectivememory portion. In some embodiments, the one or more wear metricscorrespond to wear on the respective storage device as a whole. Forexample, in some embodiments, the one or more wear metrics include acount of cumulative writes to the respective storage device, a count ofcumulative reads from the respective storage device, a count of P/Ecycles performed on the respective storage device and/or a BER for therespective storage device.

In some embodiments, the one or more metrics of the respective storagedevice include (920) one or more time metrics. In some embodiments, thestorage system or a component thereof (e.g., metrics module 222-1, FIG.2A-1, of the respective storage device; metrics module 252-1, FIG. 2B-1,of storage system controller 150; or metrics module 282-1, FIG. 2C-1, ofcluster controller 180) generates and/or maintains one or more timemetrics. In some embodiments, the one or more time metrics include awall-clock time.

In some embodiments, the one or more metrics of the respective storagedevice include (922) values of the one or more metrics from more thanone time. For example, in some embodiments, the one or more metrics ofthe respective storage device include a count of cumulative writes tothe respective storage device at a first time and a count of cumulativewrites to the respective storage device at a second time. In someembodiments, values of the one or more metrics from more than one timeinclude historical knowledge of the one or more metrics. For example, insome embodiments, the one or more metrics from more than one timeinclude a running average of the one or more metrics. In anotherexample, historical knowledge can be used to determine (e.g., compute)one or more projected values of one or more metrics at a particular timein the future (e.g., an hour, day, week, or month in the future). Insome embodiments, historical knowledge of the one or more metrics of therespective storage device is used to detect a trigger condition, asdescribed below with respect to operation 904.

The storage system detects (904) a trigger condition for reducingdeclared capacity of the non-volatile memory of a respective storagedevice of the plurality of storage devices of the storage system, thetrigger condition detected in accordance with the one or more metrics ofone or more storage devices of the plurality of storage devices.Alternatively, in some embodiments, the trigger condition detected inaccordance with the one or more metrics of one or more storage devicesof the plurality of storage devices is a trigger condition for reducingdeclared capacity of the non-volatile memory of a subset (e.g., one ormore, including all) of the one or more storage devices, and theassociated amelioration process described below with respect tooperation 908 is an amelioration process to reduce declared capacity ofthe non-volatile memory of a subset (e.g., one or more, including all)of the one or more storage devices. In some embodiments, the triggercondition is detected in accordance with a non-linear and/or linearcombination of the one or more metrics. In some embodiments, the triggercondition is detected in accordance with historical knowledge of the oneor more metrics. In some embodiments, a trigger detection module (e.g.,trigger detection module 224, FIGS. 2A-1 and 2A-2; trigger detectionmodule 254-1, FIG. 2B-1; or trigger detection module 284-1, FIG. 2C-1)is used to detect a trigger condition for reducing declared capacity ofthe non-volatile memory of a respective storage device of the pluralityof storage devices of the storage system, the trigger condition detectedin accordance with the one or more metrics of one or more storagedevices of the plurality of storage devices, as described above withrespect to FIGS. 2A-1, 2A-2, 2B-1, and 2C-1. Examples of triggerconditions are discussed above with reference to FIG. 6. Furthermore, insome embodiments, prior to detecting the trigger condition (904), thestorage system detects a wear condition and reduces over-provisioning ofthe non-volatile memory of the respective storage device, withoutreducing declared capacity of the non-volatile memory of the respectivestorage device, as described above with respect to operation 601 of FIG.6.

In some embodiments, one or more metrics from the plurality of storagedevices of the storage system are combined to detect the triggercondition. For example, it may be advantageous to examine the rate ofchange of historical wear metrics such as P/E cycle counts in theplurality of storage devices in order to allow the amelioration processsufficient time to complete before any one device reaches a wear limit.

In some embodiments, the respective storage device comprises (906) oneor more flash memory devices. In some embodiments, the respectivestorage device comprises a storage medium (e.g., storage medium 130,FIG. 1A), and the storage medium comprises one or more non-volatilestorage devices, such as flash memory devices. In some embodiments, thestorage medium (e.g., storage medium 130, FIG. 1A) is a single flashmemory device, while in other embodiments the storage medium includes aplurality of flash memory devices. For example, in some embodiments, thestorage medium includes dozens or hundreds of flash memory devices,organized in parallel memory channels, such as 16, 32 or 64 flash memorydevices per memory channel, and 8, 16 or 32 parallel memory channels. Insome embodiments, the non-volatile storage medium (e.g., storage medium130, FIG. 1A) includes NAND-type flash memory or NOR-type flash memory.In other embodiments, the storage medium comprises one or more othertypes of non-volatile storage devices.

The storage system enables (908) an amelioration process associated withthe detected trigger condition, the amelioration process to reducedeclared capacity of the non-volatile memory of the respective storagedevice. In some embodiments, the amelioration process includes alteringan encoding format (e.g., from TLC to SLC and/or changing the redundancymechanism) of at least a portion of the non-volatile memory of therespective storage device. In some embodiments, altering the encodingformat of at least a portion of the non-volatile memory of the storagedevice includes setting the encoding format of an entirety of thenon-volatile memory of the storage device to a low-density physicalencoding format, for example SLC. For example, prior to the ameliorationprocess the storage device includes some blocks (e.g., 98%) encoded asTLC and other blocks (e.g., 2%) encoded as SLC, and after theamelioration process all blocks are encoded using the lower-densityphysical encoding format, SLC. The latter example may correspond to astorage device that initially stores all client data using TLC and allstorage device metadata using SLC. The amelioration process converts allof the client data from TLC to SLC without changing the encoding formatof the storage device metadata (SLC).

In some embodiments, the amelioration process includes a process toreduce utilization by a host, a process to reduce declared capacity ofthe non-volatile memory of the respective storage device, and/or aprocess to advertise a reduced declared capacity. In some embodiments,an enabling module (e.g., enabling module 226, FIGS. 2A-1 and 2A-2;enabling module 256-1, FIG. 2B-1; or enabling module 286-1, FIG. 2C-1)is used to enable an amelioration process associated with the detectedtrigger condition, the amelioration process to reduce declared capacityof the non-volatile memory of the respective storage device, asdescribed above with respect to FIGS. 2A-1, 2A-2, 2B-1, and 2C-1.

In some embodiments, enabling the amelioration process associated withthe detected trigger condition includes (924) notifying a host (e.g.,computer system 110, FIG. 1A, computer system 142, FIG. 1B, computersystem 172, FIG. 1C, storage system controller 150, FIG. 1B, and/orcluster controller 180, FIG. 1C) to which the respective storage deviceis operatively coupled of the trigger condition. In some embodiments,notifying the host of the trigger condition includes notifying the hostwith an unsolicited communication. For example, in some embodiments, theunsolicited communication includes an interrupt communication.

In some embodiments, the host includes (926) a client on behalf of whichdata is stored in the storage system (e.g., data storage system 100,FIG. 1A; data storage system 140, FIG. 1B; data storage system 170, FIG.1C). In some embodiments, the client is or includes an entity on behalfof which data is stored in the storage system. For example, in someembodiments, the host is (1) computer system 110 (FIG. 1A) or a clientprocess, module or application executed by computer system 110, (2)computer system 142 (FIG. 1B) or a client process or applicationexecuted by computer system 142, and/or (3) computer system 172 (FIG.1C) or (4) a client process, module or application executed by computersystem 172.

In some embodiments, the host includes (928) a storage system controllerof the storage system (e.g., data storage system 140, FIG. 1B). In someembodiments, the storage system controller controls and/or coordinatesoperations among one or more storage devices. For example, in someembodiments, the host is storage system controller 150 (FIG. 1B). Insome of these embodiments, the data storage system (e.g., data storagesystem 140, FIG. 1B) is called a scale-up system.

In some embodiments, the host includes (930) a cluster controller of thestorage system (e.g., data storage system 170, FIG. 1C). In someembodiments, the cluster controller controls and/or coordinatesoperations among one or more data storage subsystems, as shown forexample in FIG. 1C, where each of the data storage subsystems may beimplemented as a data storage system having one or more storage devices(e.g., data storage system 140, FIG. 1B). For example, in someembodiments, the host is cluster controller 180 (FIG. 1C). In some ofthese embodiments, the data storage system (e.g., data storage system170, FIG. 1C) is called a scale-out system.

In some embodiments, enabling the amelioration process associated withthe detected trigger condition includes (932): (1) receiving a queryfrom a host (e.g., computer system 110, FIG. 1A, computer system 142,FIG. 1B, computer system 172, FIG. 1C, storage system controller 150,FIG. 1B, and/or cluster controller 180, FIG. 1C) to which the respectivestorage device is operatively coupled, and (2) in response to receivingthe query, reporting the trigger condition. For example, in someembodiments, computer system 142 (FIG. 1B) polls for the triggercondition and storage system controller 150 (FIG. 1B) receives the queryfrom computer system 142 and in response to receiving the query, reportsthe trigger condition. As another example, in some embodiments, computersystem 172 (FIG. 1C) polls for the trigger condition and clustercontroller 150 (FIG. 1C) receives the query from computer system 172 andin response to receiving the query, reports the trigger condition. Asyet another example, in some embodiments, the host polls for the triggercondition and the respective storage device receives the query from thehost and in response to receiving the query, reports the triggercondition.

In some embodiments, enabling the amelioration process associated withthe detected trigger condition includes (934): (1) receiving a commandfrom a host (e.g., computer system 110, FIG. 1A, computer system 142,FIG. 1B, computer system 172, FIG. 1C, storage system controller 150,FIG. 1B, and/or cluster controller 180, FIG. 1C) to which the respectivestorage device is operatively coupled, and (2) in response to receivingthe command, sending a response to the command and a notification of thetrigger condition. In some embodiments, the command includes an I/O(input/output) request. In some embodiments, the I/O request includes aread request from the respective storage device and/or a write requestto the respective storage device. In some embodiments, the commandincludes a request for temperature of the respective storage device. Insome embodiments, the command includes a request for some other statusof the respective storage device. In some embodiments, the notificationof the trigger condition is piggy-backed on a response to the commandfrom the host. For example, in some embodiments, the host issues a readrequest for data from the respective storage device, and the respectivestorage device (1) receives the read request from the host, and (2) inresponse to receiving the read request, the respective storage devicesends data corresponding to the read request and a notification of thetrigger condition. As another example, in some embodiments, the host(e.g., computer system 142, FIG. 1B; or computer system 172, FIG. 1C)issues a read request for data, and the storage system or one or morecomponents of the storage system (e.g., storage system controller 150,FIG. 1B; or cluster controller 180, FIG. 1C) (1) receives the readrequest from the host, and (2) in response to receiving the readrequest, the storage system or one or more components of the storagesystem sends data corresponding to the read request and a notificationof the trigger condition.

In some embodiments, enabling the amelioration process associated withthe detected trigger condition includes (936): (1) receiving a commandfrom a host (e.g., computer system 110, FIG. 1A, computer system 142,FIG. 1B, computer system 172, FIG. 1C, storage system controller 150,FIG. 1B, and/or cluster controller 180, FIG. 1C) to which the respectivestorage device is operatively coupled, and (2) in response to receivingthe command, sending a response to the command and a notification thatprompts the host to obtain information with respect to the triggercondition. In some embodiments, the command includes an I/O(input/output) request. In some embodiments, the I/O request includes aread request from the respective storage device and/or a write requestto the respective storage device. In some embodiments, the commandincludes a request for temperature of the respective storage device. Insome embodiments, the command includes a request for some other statusof the respective storage device. In some embodiments, the notificationthat prompts the host to obtain information with respect to the triggercondition is piggy-backed on a response to the command from the host.For example, in some embodiments, the host issues a read request fordata from the respective storage device, and the respective storagedevice (1) receives the read request from the host, and (2) in responseto receiving the read request, the respective storage device sends datacorresponding to the read request and a notification (e.g., by setting anotification bit) that prompts the host to obtain information withrespect to the trigger condition. As another example, in someembodiments, the host (e.g., computer system 142, FIG. 1B; or computersystem 172, FIG. 1C) issues a read request for data, and the storagesystem or one or more components of the storage system (e.g., storagesystem controller 150, FIG. 1B; or cluster controller 180, FIG. 1C) (1)receives the read request from the host, and (2) in response toreceiving the read request, the respective storage device sends datacorresponding to the read request and a notification (e.g., by setting anotification bit) that prompts the host to obtain information withrespect to the trigger condition. In some embodiments, the mechanismused for returning such a notification when responding to a command fromthe host is a SCSI deferred error or deferred error response code.

Although a few examples of notification are described here, thoseskilled in the art will appreciate that the embodiments described hereinmay be extended to other notification methods, such as notificationmethods described herein with reference to method 1000.

In some embodiments, enabling the amelioration process associated withthe detected trigger condition includes (938) scheduling theamelioration process to be performed on the respective storage device.For example, in some embodiments, the trigger condition feeds back tostorage system controller 150 (FIG. 1B) and storage system controller150 enables the amelioration process by scheduling the ameliorationprocess to be performed on the respective storage device. As anotherexample, in some embodiments, the trigger condition feeds back tocluster controller 180 (FIG. 1C) and cluster controller 180 enables theamelioration process by scheduling the amelioration process to beperformed on the respective storage device.

In some embodiments, enabling the amelioration process associated withthe detected trigger condition includes (940) determining one or moreparameters for the amelioration process. In some embodiments, the one ormore parameters for the amelioration process include a level of urgencyfor the amelioration process and a targeted amount of storage capacityof the non-volatile memory that needs to be reduced in the respectivestorage device. For example, in some embodiments, the one or moreparameters for the amelioration process include a parameter indicatingthat the urgency level is high (e.g., the amelioration process needs tobegin within the next hour) and a parameter indicating that 1 GB ofstorage capacity needs to be reduced in the respective storage device.

In some embodiments, enabling the amelioration process associated withthe detected trigger condition further includes (942) reporting at leasta subset of the one or more parameters for the amelioration process. Forexample, in some embodiments, enabling the amelioration processassociated with the detected trigger condition further includesreporting a targeted amount of storage capacity of the non-volatilememory that needs to be reduced in the respective storage device.

In some embodiments, the obtaining, the enabling, or both the obtainingand the enabling are performed (944) by one or more subsystems of thestorage system distinct from the plurality of storage devices. Forexample, in some of these embodiments, the obtaining, the enabling, orboth the obtaining and the enabling are performed by a storage systemcontroller (e.g., storage system controller 150, FIG. 1B) of the storagesystem (e.g., data storage system 140, FIG. 1B). As another example, insome of these embodiments, the obtaining, the enabling, or both theobtaining and the enabling are performed by a cluster controller (e.g.,cluster controller 180, FIG. 1C) of the storage system (e.g., datastorage system 170, FIG. 1C). In some embodiments, method 900, or atleast the performing operation 902 and/or enabling operation 908 ofmethod 900, is governed by instructions that are stored in anon-transitory computer readable storage medium and that are executed byone or more processors of a device, such as the one or more processingunits (CPUs) 152-1 of system management module 151-1, shown in FIGS. 1Band 2B-1 or the one or more processing units (CPUs) 182-1 of clustermanagement module 181-1, shown in FIGS. 1C and 2C-1.

In some embodiments, after enabling the amelioration process (910): thestorage system re-evaluates the trigger condition in accordance with theone or more metrics of the one or more storage devices of the pluralityof storage devices, and (2) in accordance with a determination that thetrigger condition is no longer valid, aborts the amelioration process toreduce declared capacity of the non-volatile memory of the respectivestorage device. For example, in some embodiments, the one or moremetrics may change such that the trigger condition is no longer present(e.g., the amelioration process is no longer needed). For example,normal storage operations (read, write, trim, etc.) performed coincidentin time with the amelioration process may cause the metrics to change sothat the trigger condition is no longer present. In some embodiments, atrigger detection module (e.g., trigger detection module 224, FIGS. 2A-1and 2A-2; trigger detection module 254-1, FIG. 2B-1; or triggerdetection module 284-1, FIG. 2C-1) and/or an enabling module (e.g.,enabling module 226, FIGS. 2A-1 and 2A-2; enabling module 256-1, FIG.2B-1; or enabling module 286-1, FIG. 2C-1) are used to, after enablingthe amelioration process, (1) re-evaluate the trigger condition inaccordance with the one or more metrics of the one or more storagedevices of the plurality of storage devices, and (2) in accordance witha determination that the trigger condition is no longer valid, abort theamelioration process to reduce declared capacity of the non-volatilememory of the respective storage device, as described above with respectto FIGS. 2A-1, 2A-2, 2B-1, and 2C-1.

In some embodiments, any of the method described above are performed bya storage system, the storage system including (1) non-volatile memory,(2) one or more processors, and (3) controller memory storing one ormore programs, which when executed by the one or more processors causethe storage system to perform or control performance of any of themethods described herein.

In some embodiments, any of the methods described above are performed bya storage system including means for performing any of the methodsdescribed herein.

In some embodiments, any of the methods described above are performed bya storage system, the storage system including (1) a plurality ofstorage devices, (2) one or more subsystems having one or moreprocessors, and (3) memory storing one or more programs, which whenexecuted by the one or more processors cause the one or more subsystemsto perform or control performance of any of the methods describedherein.

FIGS. 10A-10C illustrate a flowchart representation of a method 1000 ofmanaging a storage system, in accordance with some embodiments. At leastin some embodiments, method 1000 is performed by a storage device (e.g.,storage device 120, FIG. 1A, storage device 160, FIG. 1B, or storagedevice 194, FIG. 1C) or one or more components of the storage device(e.g., storage controller 124, FIG. 1A), wherein the storage device isoperatively coupled with a host system (e.g., computer system 110, FIG.1A, computer system 142, FIG. 1B, computer system 172, FIG. 1C, storagesystem controller 150, FIG. 1B, or cluster controller 180, FIG. 1C). Insome embodiments, method 1000 is governed by instructions that arestored in a non-transitory computer readable storage medium and that areexecuted by one or more processors of a device, such as the one or moreprocessing units (CPUs) 122-1 of management module 121-1, shown in FIGS.1A and 2A-1. In some embodiments, method 1000 is performed by a storagesystem (e.g., data storage system 100, FIG. 1A, data storage system 140,FIG. 1B, and/or data storage system 170, FIG. 1C) or one or morecomponents of the storage system (e.g., storage device 120, FIG. 1A,storage device 160, FIG. 1B, or storage device 194, FIG. 1C). In someembodiments, some of the operations of method 1000 are performed at astorage device (e.g., storage device 120, FIG. 1A, storage device 160,FIG. 1B, or storage device 194, FIG. 1C) and information is transmittedto a host (e.g., computer system 110, FIG. 1A, computer system 142, FIG.1B, computer system 172, FIG. 1C, storage system controller 150, FIG.1B, or cluster controller 180, FIG. 1C). For ease of explanation, thefollowing describes method 1000 as performed by a storage device (e.g.,storage device 120, FIG. 1A) of a storage system (e.g., data storagesystem 100, FIG. 1A). However, those skilled in the art will appreciatethat in other embodiments, one or more of the operations described inmethod 1000 are performed by a storage device of another storage system(e.g., storage device 160 of data storage system 140, FIG. 1B, orstorage device 194 of data storage system 170, FIG. 1C).

At a storage device of the storage system, the storage device includingnon-volatile memory (1002), the storage device (e.g., storage device120, FIG. 1A) detects (1004) a trigger condition for reducing declaredcapacity of the non-volatile memory of the storage device. In someembodiments, the trigger condition is detected in accordance with anon-linear and/or linear combination of one or more metrics of thestorage device. In some embodiments, the trigger condition is detectedin accordance with historical knowledge of the one or more metrics, asdescribed above with respect to operation 602 of FIG. 6. In someembodiments, the trigger condition is detected when the storage devicetransitions from normal operation to read-only mode. In someembodiments, a trigger detection module (e.g., trigger detection module224-1, FIG. 2A-1) is used to detect a trigger condition for reducingdeclared capacity of the non-volatile memory of the storage device, asdescribed above with respect to FIG. 2A-1. Furthermore, in someembodiments, prior to detecting the trigger condition (1004), thestorage device detects a wear condition and reduces over-provisioning ofthe non-volatile memory of the storage device, without reducing declaredcapacity of the non-volatile memory of the storage device, as describedabove with respect to operation 601 of FIG. 6.

In some embodiments, the amelioration process to reduce declaredcapacity of the non-volatile memory of the storage device includes aprocess to reduce utilization of the non-volatile memory of the storagedevice, for example as described above with respect to operation 608 ofFIG. 6.

In some embodiments, the storage device comprises (1006) one or moreflash memory devices. In some embodiments, the storage device comprisesa storage medium (e.g., storage medium 130, FIG. 1A), and the storagemedium comprises one or more non-volatile storage devices, such as flashmemory devices. In some embodiments, the storage medium (e.g., storagemedium 130, FIG. 1A) is a single flash memory device, while in otherembodiments the storage medium includes a plurality of flash memorydevices. For example, in some embodiments, the storage medium includesdozens or hundreds of flash memory devices, organized in parallel memorychannels, such as 16, 32 or 64 flash memory devices per memory channel,and 8, 16 or 32 parallel memory channels. In some embodiments, thenon-volatile storage medium (e.g., storage medium 130, FIG. 1A) includesNAND-type flash memory or NOR-type flash memory. In other embodiments,the storage medium comprises one or more other types of non-volatilestorage devices.

In some embodiments, the trigger condition is (1008) detected by thestorage device in accordance with one or more metrics of the storagedevice. In some embodiments, the one or more metrics of the storagedevice include one or more status metrics corresponding to the storagedevice's ability to retain data, one or more performance metricscorresponding to performance of the storage device, one or more wearmetrics corresponding to wear on the storage device, and/or one or moretime metrics, as described above with respect to operation 602 of FIG.6. Additional example of metrics of a storage device are describedherein with respect to method 900. Examples of trigger conditions arediscussed above with reference to FIG. 6.

At a storage device of the storage system, the storage device includingnon-volatile memory (1002), the storage device (e.g., storage device120, FIG. 1A) notifies (1010) a host to which the storage device isoperatively coupled of the trigger condition for reducing declaredcapacity of the non-volatile memory of the storage device, the triggercondition for enabling performance of an amelioration process to reducedeclared capacity of the non-volatile memory of the storage device. Insome embodiments, a notification module (e.g., notification module228-1, FIG. 2A-1) is used to notify a host to which the storage deviceis operatively coupled of the trigger condition for reducing declaredcapacity of the non-volatile memory of the storage device, as describedabove with respect to FIG. 2A-1.

In some embodiments, the host includes (1014) a client on behalf ofwhich data is stored in the storage system (e.g., data storage system100, FIG. 1A; data storage system 140, FIG. 1B; data storage system 170,FIG. 1C). In some embodiments, the client is or includes an entity onbehalf of which data is stored in the storage system. For example, insome embodiments, the host is (1) computer system 110 (FIG. 1A) or aclient process, module or application executed by computer system 110,(2) computer system 142 (FIG. 1B) or a client process, module orapplication executed by computer system 142, and/or (3) computer system172 (FIG. 1C) or a client process, module or application executed bycomputer system 172.

In some embodiments, the host includes (1016) a storage systemcontroller of the storage system (e.g., data storage system 140, FIG.1B). In some embodiments, the storage system controller controls and/orcoordinates operations among one or more storage devices. For example,in some embodiments, the host is storage system controller 150 (FIG.1B). In some of these embodiments, the data storage system (e.g., datastorage system 140, FIG. 1B) is called a scale-up system.

In some embodiments, the host includes (1018) a cluster controller ofthe storage system (e.g., data storage system 170, FIG. 1C). In someembodiments, the cluster controller controls and/or coordinatesoperations among one or more data storage subsystems, as shown forexample in FIG. 1C, where each of the data storage subsystems may beimplemented as a data storage system having one or more storage devices(e.g., data storage system 140, FIG. 1B). For example, in someembodiments, the host is cluster controller 180 (FIG. 1C). In some ofthese embodiments, the data storage system (e.g., data storage system170, FIG. 1C) is called a scale-out system, sometimes known as aclustered storage system.

In some embodiments, notifying (1010) the host of the trigger conditionfor reducing declared capacity of the non-volatile memory of the storagedevice includes notifying (1020) the host (e.g., computer system 110,FIG. 1A, computer system 142, FIG. 1B, computer system 172, FIG. 1C,storage system controller 150, FIG. 1B, and/or cluster controller 180,FIG. 1C) with an unsolicited communication. For example, in someembodiments, the unsolicited communication includes an interruptcommunication. As another example, in some embodiments, the unsolicitedcommunication includes a remote direct memory access (RDMA). As yetanother example, in some embodiments, the unsolicited communicationincludes a TCP connection request. In some embodiments, the unsolicitedcommunication includes any other form of unsolicited communication.

In some embodiments, notifying (1010) the host of the trigger conditionfor reducing declared capacity of the non-volatile memory of the storagedevice includes (1022): (1) receiving a query from the host (e.g.,computer system 110, FIG. 1A, computer system 142, FIG. 1B, computersystem 172, FIG. 1C, storage system controller 150, FIG. 1B, and/orcluster controller 180, FIG. 1C), and (2) in response to receiving thequery, reporting the trigger condition. For example, in someembodiments, the host polls for the trigger condition and the storagedevice receives the query from the host and in response to receiving thequery, reports the trigger condition.

In some embodiments, notifying (1010) the host of the trigger conditionfor reducing declared capacity of the non-volatile memory of the storagedevice includes (1024): (1) receiving a command from the host (e.g.,computer system 110, FIG. 1A, computer system 142, FIG. 1B, computersystem 172, FIG. 1C, storage system controller 150, FIG. 1B, and/orcluster controller 180, FIG. 1C), and (2) in response to receiving thecommand, sending a response to the command and a notification of thetrigger condition. In some embodiments, the command includes an I/O(input/output) request. In some embodiments, the I/O request includes aread request from the storage device and/or a write request to thestorage device. In some embodiments, the command includes a request fortemperature of the storage device. In some embodiments, the commandincludes a request for some other status of the storage device. In someembodiments, the notification of the trigger condition is piggy-backedon a response to the command from the host. For example, in someembodiments, the host issues a read request for data from the storagedevice, and the storage device (1) receives the read request from thehost, and (2) in response to receiving the read request, the storagedevice sends data corresponding to the read request and a notificationof the trigger condition.

In some embodiments, notifying (1010) the host of the trigger conditionfor reducing declared capacity of the non-volatile memory of the storagedevice includes (1026): (1) receiving a command from the host (e.g.,computer system 110, FIG. 1A, computer system 142, FIG. 1B, computersystem 172, FIG. 1C, storage system controller 150, FIG. 1B, and/orcluster controller 180, FIG. 1C), and (2) in response to receiving thecommand, sending a response to the command and a notification thatprompts the host to obtain information with respect to the triggercondition. In some embodiments, the command includes an I/O(input/output) request. In some embodiments, the I/O request includes aread request from the storage device and/or a write request to thestorage device. In some embodiments, the command includes a request fortemperature of the storage device. In some embodiments, the commandincludes a request for some other status of the storage device. In someembodiments, the notification that prompts the host to obtaininformation with respect to the trigger condition is piggy-backed on aresponse to the command from the host. For example, in some embodiments,the host issues a read request for data from the storage device, and thestorage device (1) receives the read request from the host, and (2) inresponse to receiving the read request, the storage device sends datacorresponding to the read request and a notification (e.g., by setting anotification bit) that prompts the host to obtain information withrespect to the trigger condition. In some embodiments, the mechanismused for returning a notification when responding to a command from thehost is a SCSI deferred error or deferred error response code.

In some embodiments, notifying (1010) the host of the trigger conditionfor reducing declared capacity of the non-volatile memory of the storagedevice further includes notifying (1028) the host (e.g., computer system110, FIG. 1A, computer system 142, FIG. 1B, computer system 172, FIG.1C, storage system controller 150, FIG. 1B, and/or cluster controller180, FIG. 1C) that the storage device is in read-only mode. In someembodiments, notifying the host that the storage device is in read-onlymode includes notifying the host that the storage device is notaccepting any more write commands. In some embodiments, notifying thehost that the storage device is in read-only mode includes sending oneor more rejections of write commands.

In some embodiments, after notifying the host of the trigger conditionfor reducing declared capacity of the non-volatile memory of the storagedevice (1012), the storage device (1) re-evaluates the trigger conditionin accordance with the one or more metrics of the storage device, and(2) in accordance with a determination that the trigger condition is nolonger valid, notifies the host of an absence of the trigger conditionfor reducing declared capacity of the non-volatile memory of the storagedevice. For example, in some circumstances, the one or more metrics ofthe storage device may change such that the trigger condition is nolonger valid (e.g., the amelioration process is no longer needed). Forexample, during the operation of an amelioration process (e.g.,operation 606, FIG. 6), normal storage operations will continue to beperformed (e.g., read, write, delete, trim, etc.). Normal storageoperations include operations like trim that explicitly reduce thestorage device utilization, possibly enough to merit aborting theamelioration process. Other storage activity such as garbage collectionmay also reduce utilization, possibly enough to merit aborting theamelioration process.

In some embodiments, the trigger condition (e.g., periodically,semi-continuously, initially, finally, occasionally or irregularly) isrecomputed or re-evaluated in accordance with the one or more metrics ofthe storage device, as the one or more metrics may change in value dueto the amelioration process and/or normal storage operations (e.g.,read, write, erase and trim or unmap operations). In some embodiments, atrigger detection module (e.g., trigger detection module 224-1, FIG.2A-1) and/or a notification module (e.g., notification module 228-1,FIG. 2A-1) are used to, after notifying the host of the triggercondition for reducing declared capacity of the non-volatile memory ofthe storage device: (1) re-evaluate the trigger condition in accordancewith the one or more metrics of the storage device, and (2) inaccordance with a determination that the trigger condition is no longervalid, notify the host of an absence of the trigger condition forreducing declared capacity of the non-volatile memory of the storagedevice, as described above with respect to FIG. 2A-1.

In some embodiments, any operations of method 1000 described above areperformed by a storage device, the storage device including (1)non-volatile memory (e.g., comprising one or more non-volatile storagedevices, such as flash memory devices) (2) one or more processors, and(3) controller memory (e.g., non-volatile memory or volatile memory inor coupled to the controller) storing one or more programs, which whenexecuted by the one or more processors cause the storage device toperform or control performance of any of the methods described herein.

In some embodiments, any operations of method 1000 described above areperformed by a storage device including means for performing any of themethods described herein.

In some embodiments, any operations of method 1000 described above areperformed by a storage system comprising (1) a storage medium (e.g.,comprising one or more non-volatile storage devices, such as flashmemory devices) (2) one or more processors, and (3) memory (e.g.,non-volatile memory or volatile memory in the storage system) storingone or more programs, which when executed by the one or more processorscause the storage system to perform or control performance of any of themethods described herein.

FIGS. 11A-11C illustrate a flowchart representation of a method 1100 ofmanaging a storage system, in accordance with some embodiments. At leastin some embodiments, method 1100 is performed by a storage system (e.g.,data storage system 100, FIG. 1A, data storage system 140, FIG. 1B, ordata storage system 170, FIG. 1C) or one or more components of thestorage system (e.g., computer system 110, FIG. 1A, storage systemcontroller 150, FIG. 1B, or cluster controller 180, FIG. 1C). In someembodiments, method 1100 is governed by instructions that are stored ina non-transitory computer readable storage medium and that are executedby one or more processors of a storage system, such as the one or moreprocessing units (CPUs) 152-1 of system management module 151-1, shownin FIGS. 1B and 2B-1, the one or more processing units (CPUs) 182-1 ofcluster management module 181-1, shown in FIGS. 1C and 2C-1, or one ormore processors of an included host (e.g., computer system 110, FIG.1A), shown in FIG. 2A-2. For ease of explanation, the followingdescribes method 1100 as performed by a storage system (e.g., datastorage system 100, FIG. 1A, data storage system 140, FIG. 1B, or datastorage system 170, FIG. 1C). However, those skilled in the art willappreciate that in other embodiments, one or more of the operationsdescribed in method 1100 are performed by one or more subsystems of thestorage system distinct from the storage device (e.g., storage systemcontroller 150, FIG. 1B or cluster controller 180, FIG. 1C).

A storage system (e.g., data storage system 100, FIG. 1A, data storagesystem 140, FIG. 1B, or data storage system 170, FIG. 1C) obtains(1102), for each storage device (e.g., storage device 120, FIG. 1A, orany of storage devices 160-1 to 160-m of FIG. 1B, or any of storagedevices 194-1 to 194-n or 194-j to 194-k of FIG. 1C) of a plurality ofstorage devices of the storage system, one or more metrics of thestorage device, the storage device including non-volatile memory.Although FIG. 1A only shows one storage device 120, in some embodiments,data storage system 100 of FIG. 1A includes a plurality of storagedevices, of which storage device 120 is one example. In someembodiments, the storage device generates and/or maintains the one ormore metrics of the storage device, and the storage system obtains theone or more metrics from the storage device. In some embodiments, one ormore subsystems of a storage system distinct from the storage device(e.g., storage system controller 150, FIG. 1B, or cluster controller180, FIG. 1C) generate and/or maintain the one or more metrics of thestorage device, and the storage system obtains the one or more metricsfrom the one or more subsystems. In some embodiments, a metrics module(e.g., metrics module 222, FIGS. 2A-1 and 2A-2; metrics module 252-1,FIG. 2B-1; or metrics module 282-1, FIG. 2C-1) is used to obtain, foreach storage device of a plurality of storage devices of the storagesystem, one or more metrics of the storage device, the storage deviceincluding non-volatile memory, as described above with respect to FIGS.2A-1, 2A-2, 2B-1, and 2C-1.

The storage system detects (1104) a trigger condition for reducingdeclared capacity of the non-volatile memory of a respective storagedevice of the plurality of storage devices of the storage system, thetrigger condition detected in accordance with the one or more metrics oftwo or more of the storage devices of the plurality of storage devicesin the storage system. In some embodiments, the one or more metrics ofthe respective storage device include one or more status metricscorresponding to the respective storage device's ability to retain data,one or more performance metrics corresponding to performance of therespective storage device, one or more wear metrics corresponding towear on the respective storage device, and/or one or more time metrics,as described above with respect to operation 602 of FIG. 6. In someembodiments, the trigger condition is detected in accordance with anon-linear and/or linear combination of the one or more metrics of therespective storage device. In some embodiments, the trigger condition isdetected in accordance with historical knowledge of the one or moremetrics of the respective storage device, as described above withrespect to operation 602 of FIG. 6. In some embodiments, the triggercondition is detected when the respective storage device transitionsfrom normal operation to read-only mode. In some embodiments, one ormore metrics from the plurality of storage devices of the storage systemare combined to detect the trigger condition. For example, it may beadvantageous to examine the rate of change of historical wear metricssuch as P/E cycle counts in the plurality of storage devices in order toallow the amelioration process sufficient time to complete before anyone device reaches a wear limit. In some embodiments, a triggerdetection module (e.g., trigger detection module 224, FIGS. 2A-1 and2A-2; trigger detection module 254-1, FIG. 2B-1; or trigger detectionmodule 284-1, FIG. 2C-1) is used to detect a trigger condition forreducing declared capacity of the non-volatile memory of a respectivestorage device of the plurality of storage devices of the storagesystem, the trigger condition detected in accordance with the one ormore metrics of the respective storage device, as described above withrespect to FIGS. 2A-1, 2A-2, 2B-1, and 2C-1. Furthermore, in someembodiments, prior to detecting the trigger condition (1104), thestorage system detects a wear condition and reduces over-provisioning ofthe non-volatile memory of the respective storage device, withoutreducing declared capacity of the non-volatile memory of the respectivestorage device, as described above with respect to operation 601 of FIG.6.

In some embodiments, the respective storage device comprises (1106) oneor more flash memory devices. In some embodiments, the respectivestorage device comprises a storage medium (e.g., storage medium 130,FIG. 1A), and the storage medium comprises one or more non-volatilestorage devices, such as flash memory devices. In some embodiments, thestorage medium (e.g., storage medium 130, FIG. 1A) is a single flashmemory device, while in other embodiments the storage medium includes aplurality of flash memory devices. For example, in some embodiments, thestorage medium includes dozens or hundreds of flash memory devices,organized in parallel memory channels, such as 16, 32 or 64 flash memorydevices per memory channel, and 8, 16 or 32 parallel memory channels. Insome embodiments, the non-volatile storage medium (e.g., storage medium130, FIG. 1A) includes NAND-type flash memory or NOR-type flash memory.In other embodiments, the storage medium comprises one or more othertypes of non-volatile storage devices.

The storage system notifies (1108) a host to which the respectivestorage device is operatively coupled of the trigger condition forreducing declared capacity of the non-volatile memory of the respectivestorage device, the trigger condition for enabling performance of anamelioration process to reduce declared capacity of the non-volatilememory of the respective storage device. In some embodiments, anotification module (e.g., notification module 228, FIGS. 2A-1 and 2A-2,notification module 258-1, FIG. 2B-1, or notification module 288-1, FIG.2C-1) is used to notify a host to which the respective storage device isoperatively coupled of the trigger condition for reducing declaredcapacity of the non-volatile memory of the respective storage device,the trigger condition associated with an amelioration process to reducedeclared capacity of the non-volatile memory of the respective storagedevice, as described above with respect to FIGS. 2A-1, 2A-2, 2B-1, and2C-1. In some embodiments, or in some circumstances, the notification ofthe trigger condition causes performance of the amelioration process tobe enabled. Furthermore, in some embodiments, or in some circumstances,the amelioration process reduces declared capacity of two or more of thestorage devices in the storage system.

In some embodiments, the host includes (1112) a client on behalf ofwhich data is stored in the storage system (e.g., data storage system100, FIG. 1A; data storage system 140, FIG. 1B; data storage system 170,FIG. 1C). In some embodiments, the client is or includes an entity onbehalf of which data is stored in the storage system. For example, insome embodiments, the host is (1) computer system 110 (FIG. 1A) or aclient process, module or application executed by computer system 110,(2) computer system 142 (FIG. 1B) or a client process, module orapplication executed by computer system 142, and/or (3) computer system172 (FIG. 1C) or a client process, module or application executed bycomputer system 172.

In some embodiments, the host includes (1114) a storage systemcontroller of the storage system (e.g., data storage system 140, FIG.1B). In some embodiments, the storage system controller controls and/orcoordinates operations among one or more storage devices. For example,in some embodiments, the host is storage system controller 150 (FIG.1B). In some of these embodiments, the data storage system (e.g., datastorage system 140, FIG. 1B) is called a scale-up system.

In some embodiments, the host includes (1116) a cluster controller ofthe storage system (e.g., data storage system 170, FIG. 1C). In someembodiments, the cluster controller controls and/or coordinatesoperations among one or more data storage subsystems, as shown forexample in FIG. 1C, where each of the data storage subsystems may beimplemented as a data storage system having one or more storage devices(e.g., data storage system 140, FIG. 1B). For example, in someembodiments, the host is cluster controller 180 (FIG. 1C). In some ofthese embodiments, the data storage system (e.g., data storage system170, FIG. 1C) is called a scale-out system or a clustered storagesystem.

In some embodiments, notifying (1108) the host of the trigger conditionfor reducing declared capacity of the non-volatile memory of therespective storage device includes notifying (1118) the host (e.g.,computer system 110, FIG. 1A, computer system 142, FIG. 1B, computersystem 172, FIG. 1C, storage system controller 150, FIG. 1B, and/orcluster controller 180, FIG. 1C) with an unsolicited communication. Forexample, in some embodiments, the unsolicited communication includes aninterrupt communication. As another example, in some embodiments, theunsolicited communication includes a remote direct memory access (RDMA).As yet another example, in some embodiments, the unsolicitedcommunication includes a TCP connection request. In some embodiments,the unsolicited communication includes any other form of unsolicitedcommunication.

In some embodiments, notifying (1108) the host of the trigger conditionfor reducing declared capacity of the non-volatile memory of therespective storage device includes (1120): (1) receiving a query fromthe host (e.g., computer system 110, FIG. 1A, computer system 142, FIG.1B, computer system 172, FIG. 1C, storage system controller 150, FIG.1B, and/or cluster controller 180, FIG. 1C), and (2) in response toreceiving the query, reporting the trigger condition. For example, insome embodiments, the host polls for the trigger condition and thestorage system receives the query from the host and in response toreceiving the query, reports the trigger condition.

In some embodiments, notifying (1108) the host of the trigger conditionfor reducing declared capacity of the non-volatile memory of therespective storage device includes (1122): (1) receiving a command fromthe host (e.g., computer system 110, FIG. 1A, computer system 142, FIG.1B, computer system 172, FIG. 1C, storage system controller 150, FIG.1B, and/or cluster controller 180, FIG. 1C), and (2) in response toreceiving the command, sending a response to the command and anotification of the trigger condition. In some embodiments, the commandincludes an I/O (input/output) request. In some embodiments, the I/Orequest includes a read request from the respective storage deviceand/or a write request to the respective storage device. In someembodiments, the command includes a request for temperature of therespective storage device. In some embodiments, the command includes arequest for some other status of the respective storage device. In someembodiments, the notification of the trigger condition is piggy-backedon a response to the command from the host. For example, in someembodiments, the host issues a read request for data from the respectivestorage device, and the storage system (1) receives the read requestfrom the host, and (2) in response to receiving the read request, thestorage system sends data corresponding to the read request and anotification of the trigger condition.

In some embodiments, notifying (1108) the host of the trigger conditionfor reducing declared capacity of the non-volatile memory of therespective storage device includes (1124): (1) receiving a command fromthe host (e.g., computer system 110, FIG. 1A, computer system 142, FIG.1B, computer system 172, FIG. 1C, storage system controller 150, FIG.1B, and/or cluster controller 180, FIG. 1C), and (2) in response toreceiving the command, sending a response to the command and anotification that prompts the host to obtain information with respect tothe trigger condition. In some embodiments, the command includes an I/O(input/output) request. In some embodiments, the I/O request includes aread request from the respective storage device and/or a write requestto the respective storage device. In some embodiments, the commandincludes a request for temperature of the respective storage device. Insome embodiments, the command includes a request for some other statusof the respective storage device. In some embodiments, the notificationthat prompts the host to obtain information with respect to the triggercondition is piggy-backed on a response to the command from the host.For example, in some embodiments, the host issues a read request fordata from the respective storage device, and the storage system (1)receives the read request from the host, and (2) in response toreceiving the read request, the storage system sends data correspondingto the read request and a notification (e.g., by setting a notificationbit) that prompts the host to obtain information with respect to thetrigger condition. In some embodiments, the mechanism used for returninga notification when responding to a command from the host is a SCSIdeferred error or deferred error response code.

In some embodiments, notifying (1108) the host of the trigger conditionfor reducing declared capacity of the non-volatile memory of therespective storage device includes notifying (1126) the host (e.g.,computer system 110, FIG. 1A, computer system 142, FIG. 1B, computersystem 172, FIG. 1C, storage system controller 150, FIG. 1B, and/orcluster controller 180, FIG. 1C) that the respective storage device isin read-only mode. In some embodiments, notifying the host that therespective storage device is in read-only mode includes notifying thehost that the respective storage device is not accepting any more writecommands. In some embodiments, notifying the host that the respectivestorage device is in read-only mode includes sending one or morerejections of write commands.

In some embodiments, the obtaining, the notifying, or both the obtainingand the notifying are performed (1128) by one or more subsystems of thestorage system distinct from the plurality of storage devices. Forexample, in some of these embodiments, the obtaining, the notifying, orboth the obtaining and the notifying are performed by a storage systemcontroller (e.g., storage system controller 150, FIG. 1B) of the storagesystem (e.g., data storage system 140, FIG. 1B). As another example, insome of these embodiments, the obtaining, the notifying, or both theobtaining and the notifying are performed by a cluster controller (e.g.,cluster controller 180, FIG. 1C) of the storage system (e.g., datastorage system 170, FIG. 1C). In some embodiments, method 1100, or atleast the obtaining operation 1102 and/or the notifying operation 1108of method 1100, is governed by instructions that are stored in anon-transitory computer readable storage medium and that are executed byone or more processors of a device, such as the one or more processingunits (CPUs) 152-1 of system management module 151-1, shown in FIGS. 1Band 2B-1 or the one or more processing units (CPUs) 182-1 of clustermanagement module 181-1, shown in FIGS. 1C and 2C-1.

In some embodiments, the amelioration process to reduce declaredcapacity of the non-volatile memory of the respective storage deviceincludes (1130) a process to reduce utilization of the non-volatilememory of the respective storage device, for example as described abovewith respect to operation 608 of FIG. 6.

In some embodiments, after notifying the host of the trigger conditionfor reducing declared capacity of the non-volatile memory of therespective storage device (1110), the storage system (1) re-evaluatesthe trigger condition in accordance with the one or more metrics of thetwo or more storage devices of the plurality of storage devices in thestorage system, and (2) in accordance with a determination that thetrigger condition is no longer valid, notifies the host of an absence ofthe trigger condition for reducing declared capacity of the non-volatilememory of the respective storage device. For example, in somecircumstances, the one or more metrics of the respective storage devicemay change such that the trigger condition is no longer valid (e.g., theamelioration process is no longer needed). For example, during theoperation of an amelioration process (e.g., operation 606, FIG. 6),normal storage operations will continue to be performed (e.g., read,write, delete, trim, etc.). Normal storage operations include operationslike trim that explicitly reduce the respective storage deviceutilization, possibly enough to merit aborting the amelioration process.Other storage activity such as garbage collection may also reduceutilization, possibly enough to merit aborting the amelioration process.

In some embodiments, the trigger condition (e.g., periodically,semi-continuously, initially, finally, occasionally or irregularly) isrecomputed or re-evaluated in accordance with the one or more metrics ofthe respective storage device, as the one or more metrics may change invalue due to the amelioration process and/or normal storage operations(e.g., read, write, erase and trim or unmap operations). In someembodiments, a trigger detection module (e.g., trigger detection module224, FIGS. 2A-1 and 2A-2; trigger detection module 254-1, FIG. 2B-1; ortrigger detection module 284-1, FIG. 2C-1) and/or a notification module(e.g., notification module 228, FIGS. 2A-1 and 2A-2, notification module258-1, FIG. 2B-1, or notification module 288-1, FIG. 2C-1) are used to,after notifying the host of the trigger condition for reducing declaredcapacity of the non-volatile memory of the respective storage device:(1) re-evaluate the trigger condition in accordance with the one or moremetrics of the respective storage device, and (2) in accordance with adetermination that the trigger condition is no longer valid, notify thehost of an absence of the trigger condition for reducing declaredcapacity of the non-volatile memory of the respective storage device, asdescribed above with respect to FIGS. 2A-1, 2A-2, 2B-1, and 2C-1.

In some embodiments, any operations of method 1100 described above areperformed by a storage system, the storage system including (1)non-volatile memory (e.g., comprising one or more non-volatile storagedevices, such as flash memory devices), (2) one or more processors, and(3) controller memory (e.g., non-volatile memory or volatile memory inor coupled to a controller of the storage system) storing one or moreprograms, which when executed by the one or more processors cause thestorage system to perform or control performance of any of the methodsdescribed herein.

In some embodiments, any operations of method 1100 described above areperformed by a storage system including means for performing any of themethods described herein.

In some embodiments, any operations of method 1100 described above areperformed by a storage system including (1) a plurality of storagedevices, (2) one or more subsystems having one or more processors, and(3) memory (e.g., non-volatile memory or volatile memory in the storagesystem) storing one or more programs, which when executed by the one ormore processors cause the one or more subsystems to perform or controlperformance of any of the methods described herein.

Semiconductor memory devices include volatile memory devices, such asdynamic random access memory (“DRAM”) or static random access memory(“SRAM”) devices, non-volatile memory devices, such as resistive randomaccess memory (“ReRAM”), electrically erasable programmable read onlymemory (“EEPROM”), flash memory (which can also be considered a subsetof EEPROM), ferroelectric random access memory (“FRAM”), andmagnetoresistive random access memory (“MRAM”), and other semiconductorelements capable of storing information. Each type of memory device mayhave different configurations. For example, flash memory devices may beconfigured in a NAND or a NOR configuration.

The semiconductor memory elements located within and/or over a substratemay be arranged in two or three dimensions, such as a two dimensionalmemory structure or a three dimensional memory structure.

The term “three-dimensional memory device” (or 3D memory device) isherein defined to mean a memory device having multiple memory layers ormultiple levels (e.g., sometimes called multiple memory device levels)of memory elements, including any of the following: a memory devicehaving a monolithic or non-monolithic 3D memory array; or two or more 2Dand/or 3D memory devices, packaged together to form a stacked-chipmemory device.

One of skill in the art will recognize that this invention is notlimited to the two dimensional and three dimensional structuresdescribed but cover all relevant memory structures within the spirit andscope of the invention as described herein and as understood by one ofskill in the art.

It will be understood that, although the terms “first,” “second,” etc.may be used herein to describe various elements, these elements shouldnot be limited by these terms. These terms are only used to distinguishone element from another. For example, a first storage device could betermed a second storage device, and, similarly, a second storage devicecould be termed a first storage device, without changing the meaning ofthe description, so long as all occurrences of the “first storagedevice” are renamed consistently and all occurrences of the “secondstorage device” are renamed consistently. The first storage device andthe second storage device are both storage devices, but they are not thesame storage device.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the claims. Asused in the description of the embodiments and the appended claims, thesingular forms “a,” “an” and “the” are intended to include the pluralforms as well, unless the context clearly indicates otherwise. It willalso be understood that the term “and/or” as used herein refers to andencompasses any and all possible combinations of one or more of theassociated listed items. It will be further understood that the terms“comprises” and/or “comprising,” when used in this specification,specify the presence of stated features, integers, steps, operations,elements, and/or components, but do not preclude the presence oraddition of one or more other features, integers, steps, operations,elements, components, and/or groups thereof.

As used herein, the term “if” may be construed to mean “when” or “upon”or “in response to determining” or “in accordance with a determination”or “in response to detecting,” that a stated condition precedent istrue, depending on the context. Similarly, the phrase “if it isdetermined [that a stated condition precedent is true]” or “if [a statedcondition precedent is true]” or “when [a stated condition precedent istrue]” may be construed to mean “upon determining” or “in response todetermining” or “in accordance with a determination” or “upon detecting”or “in response to detecting” that the stated condition precedent istrue, depending on the context.

The foregoing description, for purpose of explanation, has beendescribed with reference to specific embodiments. However, theillustrative discussions above are not intended to be exhaustive or tolimit the claims to the precise forms disclosed. Many modifications andvariations are possible in view of the above teachings. The embodimentswere chosen and described in order to best explain principles ofoperation and practical applications, to thereby enable others skilledin the art.

What is claimed is:
 1. A method of managing a storage system, the methodcomprising: at a storage device of the storage system, the storagedevice including non-volatile memory: detecting a trigger condition forreducing declared capacity of the non-volatile memory of the storagedevice, wherein declared capacity is storage capacity available to ahost and wherein a total storage capacity of the non-volatile memory ofthe storage device includes declared capacity and over-provisioning;notifying the host to which the storage device is operatively coupled ofthe trigger condition for reducing declared capacity of the non-volatilememory of the storage device, the trigger condition for enablingperformance of an amelioration process to reduce declared capacity ofthe non-volatile memory of the storage device; prior to detecting thetrigger condition, detecting a first wear condition of the non-volatilememory of the storage device; and in response to detecting the firstwear condition, performing a remedial action that reducesover-provisioning of the non-volatile memory of the storage devicewithout reducing declared capacity of the non-volatile memory of thestorage device; wherein detecting the trigger condition comprisesdetecting a second wear condition distinct from the first wearcondition.
 2. The method of claim 1, wherein the host includes a clienton behalf of which data is stored in the storage system.
 3. The methodof claim 1, wherein the host includes a storage system controller of thestorage system.
 4. The method of claim 1, wherein the host includes acluster controller of the storage system.
 5. The method of claim 1,wherein notifying the host of the trigger condition for reducingdeclared capacity of the non-volatile memory of the storage deviceincludes notifying the host with an unsolicited communication.
 6. Themethod of claim 1, wherein notifying the host of the trigger conditionfor reducing declared capacity of the non-volatile memory of the storagedevice includes: receiving a query from the host; and in response toreceiving the query, reporting the trigger condition.
 7. The method ofclaim 1, wherein notifying the host of the trigger condition forreducing declared capacity of the non-volatile memory of the storagedevice includes: receiving a command from the host; and in response toreceiving the command, sending a response to the command and anotification of the trigger condition.
 8. The method of claim 1, whereinnotifying the host of the trigger condition for reducing declaredcapacity of the non-volatile memory of the storage device includes:receiving a command from the host; and in response to receiving thecommand, sending a response to the command and a notification thatprompts the host to obtain information with respect to the triggercondition.
 9. The method of claim 1, wherein notifying the host of thetrigger condition for reducing declared capacity of the non-volatilememory of the storage device further includes notifying the host thatthe storage device is in read-only mode.
 10. The method of claim 1,wherein the trigger condition is detected by the storage device inaccordance with one or more metrics of the storage device.
 11. Themethod of claim 10, further comprising: after notifying the host of thetrigger condition for reducing declared capacity of the non-volatilememory of the storage device: re-evaluating the trigger condition inaccordance with the one or more metrics of the storage device; and inaccordance with a determination that the trigger condition is no longervalid, notifying the host of an absence of the trigger condition forreducing declared capacity of the non-volatile memory of the storagedevice.
 12. The method of claim 1, wherein the amelioration process toreduce declared capacity of the non-volatile memory of the storagedevice includes a process to reduce utilization of the non-volatilememory of the storage device.
 13. The method of claim 1, wherein thestorage device comprises one or more flash memory devices.
 14. A storagedevice, comprising: non-volatile memory; one or more processors; andcontroller memory storing one or more programs, which when executed bythe one or more processors cause the storage device to performoperations comprising: detecting a trigger condition for reducingdeclared capacity of the non-volatile memory of the storage device,wherein declared capacity is storage capacity available to a host andwherein a total storage capacity of the non-volatile memory of thestorage device includes declared capacity and over-provisioning;notifying the host to which the storage device is operatively coupled ofthe trigger condition for reducing declared capacity of the non-volatilememory of the storage device; prior to detecting the trigger condition,detecting a first wear condition of the non-volatile memory of thestorage device; and in response to detecting the first wear condition,performing a remedial action that reduces over-provisioning of thenon-volatile memory of the storage device without reducing declaredcapacity of the non-volatile memory of the storage device; whereindetecting the trigger condition comprises detecting a second wearcondition distinct from the first wear condition.
 15. The storage deviceof claim 14, wherein notifying the host of the trigger condition forreducing declared capacity of the non-volatile memory of the storagedevice includes notifying the host with an unsolicited communication.16. The storage device of claim 14, wherein notifying the host of thetrigger condition for reducing declared capacity of the non-volatilememory of the storage device includes: receiving a query from the host;and in response to receiving the query, reporting the trigger condition.17. The storage device of claim 14, wherein notifying the host of thetrigger condition for reducing declared capacity of the non-volatilememory of the storage device includes: receiving a command from thehost; and in response to receiving the command, sending a response tothe command and a notification of the trigger condition.
 18. The storagedevice of claim 14, wherein the storage device comprises one or moreflash memory devices.
 19. A non-transitory computer readable storagemedium, storing one or more programs configured for execution by one ormore processors of a storage device, the storage device includingnon-volatile memory, the one or more programs including instructionsfor: detecting a trigger condition for reducing declared capacity of thenon-volatile memory of the storage device, wherein declared capacity isstorage capacity available to a host and wherein a total storagecapacity of the non-volatile memory of the storage device includesdeclared capacity and over-provisioning; notifying the host to which thestorage device is operatively coupled of the trigger condition forreducing declared capacity of the non-volatile memory of the storagedevice, the trigger condition for enabling performance of anamelioration process to reduce declared capacity of the non-volatilememory of the storage device; prior to detecting the trigger condition,detecting a first wear condition of the non-volatile memory of thestorage device; and in response to detecting the first wear condition,performing a remedial action that reduces over-provisioning of thenon-volatile memory of the storage device without reducing declaredcapacity of the non-volatile memory of the storage device; whereindetecting the trigger condition comprises detecting a second wearcondition distinct from the first wear condition.
 20. The non-transitorycomputer readable storage medium of claim 19, wherein notifying the hostof the trigger condition for reducing declared capacity of thenon-volatile memory of the storage device includes notifying the hostwith an unsolicited communication.
 21. The non-transitory computerreadable storage medium of claim 19, wherein notifying the host of thetrigger condition for reducing declared capacity of the non-volatilememory of the storage device includes: receiving a query from the host;and in response to receiving the query, reporting the trigger condition.22. The non-transitory computer readable storage medium of claim 19,wherein notifying the host of the trigger condition for reducingdeclared capacity of the non-volatile memory of the storage deviceincludes: receiving a command from the host; and in response toreceiving the command, sending a response to the command and anotification of the trigger condition.
 23. The non-transitory computerreadable storage medium of claim 19, wherein the storage devicecomprises one or more flash memory devices.